import { Request, Response } from "express";
import { DashboardService } from "./dashboard.service";

const service = new DashboardService();

export class DashboardController {
   
    async getDashboard(
        req:Request,
        res:Response
    ){
        try{

            const dashboard = await service.getDashboard();
            res.status(200).json(dashboard);

        }catch(error){
            res.status(500).json({
                message:"Error al obtener información del Dashboard",
                error
            });
        }
    }
   
}