Update getMonitorsByTeamid to use attached notifications

This commit is contained in:
Alex Holliday committed 2024-08-30 18:00:04 -07:00
1 parent 5b140198d6
commit 68b50a3059
2 files changed
+4 -7

No files matched your search

+1 -6
View File
@@ -346,12 +346,7 @@ const getMonitorsByTeamId = async (req, res) => {
if (normalize !== undefined) {
checks = NormalizeData(checks, 10, 100);
}
// Get notifications
const notifications = await Notification.find({
monitorId: monitor._id,
});
return { ...monitor.toObject(), checks, notifications };
return { ...monitor.toObject(), checks };
})
);
return monitorsWithChecks;