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:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user