mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-03 15:09:34 -05:00
Add notifcations to getMonitorById as well
This commit is contained in:
@@ -64,7 +64,8 @@ const getMonitorById = async (req, res) => {
|
||||
createdAt: sortOrder,
|
||||
})
|
||||
.limit(limit);
|
||||
const monitorWithChecks = { ...monitor.toObject(), checks };
|
||||
const notifications = await Notification.find({ monitorId: monitor._id });
|
||||
const monitorWithChecks = { ...monitor.toObject(), checks, notifications };
|
||||
return monitorWithChecks;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user