Files
gameno-api/components/dashboard/dashboardController.js
T
kavehhn f04c797be6 Initial commit: teaching institution management API.
Express/MongoDB backend with JWT auth, RBAC, S3 uploads, notifications, and scheduled jobs.
2026-08-09 04:18:08 +02:00

12 lines
446 B
JavaScript

// /components/dashboard/dashboardController.js
'use strict';
const catchAsync = require('../../utils/catchAsync');
const dashboardService = require('./dashboardService');
const { successResponse } = require('../../utils/apiResponse');
exports.getAdminStats = catchAsync(async (req, res, next) => {
const stats = await dashboardService.getAdminStats();
return successResponse(res, 200, 'Dashboard stats retrieved successfully', stats);
});