// /components/financialReports/financialReportController.js 'use strict'; const catchAsync = require('../../utils/catchAsync'); const financialReportService = require('./financialReportService'); const { successResponse } = require('../../utils/apiResponse'); exports.getClassReport = catchAsync(async (req, res) => { const report = await financialReportService.getClassReport(req.params.classId); return successResponse(res, 200, 'Class financial report retrieved successfully', report); }); exports.getSessionReport = catchAsync(async (req, res) => { const report = await financialReportService.getSessionReport(req.params.sessionId); return successResponse(res, 200, 'Session financial report retrieved successfully', report); }); exports.getRangeReport = catchAsync(async (req, res) => { const report = await financialReportService.getRangeReport(req.query); return successResponse(res, 200, 'Date-range financial report retrieved successfully', report); });