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