feat: add class discounts, frontend visibility, and public listing

Add hasDiscount, freeSpots, and showOnFrontend on classes with a public get-all endpoint and richer notification user populate.
This commit is contained in:
2026-08-16 08:11:42 +03:30
parent 21bff0c4ba
commit f57d8bbdfa
5 changed files with 100 additions and 10 deletions
+5
View File
@@ -44,3 +44,8 @@ exports.getMyClasses = catchAsync(async (req, res) => {
const { data, meta } = await classService.getMyClasses(req.user._id, req.query);
return listResponse(res, 200, data, meta);
});
exports.getPublicClasses = catchAsync(async (req, res) => {
const { data, meta } = await classService.getPublicClasses(req.query);
return listResponse(res, 200, data, meta);
});