const dashboardService = require('../services/dashboard.service');
const { OK } = require('../core/success.response');

class DashboardController {
    async getDashboardStats(req, res) {
        const stats = await dashboardService.getStats();
        const chart = await dashboardService.getChartData();
        const recent = await dashboardService.getRecentActivities();

        new OK({
            message: 'Get dashboard stats success',
            metadata: {
                stats,
                chart,
                recent,
            },
        }).send(res);
    }
}

module.exports = new DashboardController();
