12 lines
336 B
JavaScript
12 lines
336 B
JavaScript
const catchAsync = require('../../globalErrorHandler/catchAsync')
|
|
const dashboardService = require('./dashboardService')
|
|
|
|
exports.getDashboardStats = catchAsync(async (req, res, next) => {
|
|
const stats = await dashboardService.getDashboardStats()
|
|
|
|
res.status(200).json({
|
|
status: 'success',
|
|
data: stats,
|
|
})
|
|
})
|