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
@@ -49,7 +49,7 @@ const getAllNotifications = async (queryParams) => {
const filter = buildFilterQuery(queryParams, ['subject', 'body']);
const [notifications, totalCount] = await Promise.all([
Notification.find(filter).populate('user', 'name username').sort(sort).skip(skip).limit(limit),
Notification.find(filter).populate('user', 'name username phoneNumber').sort(sort).skip(skip).limit(limit),
Notification.countDocuments(filter)
]);