Update getMonitorsByTeamid to use attached notifications
This commit is contained in:
1 parent
5b140198d6
commit
68b50a3059
2 files changed
+4
-7
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user