refactor notifications service

This commit is contained in:
Alex Holliday committed 2026-01-21 13:51:04 -08:00
1 parent 5b43d9d173
commit d627a25b40
13 files changed
+132 -47

No files matched your search

@@ -189,6 +189,10 @@ class MongoMonitorsRepository implements IMonitorsRepository {
return groups.sort();
};
removeNotificationFromMonitors = async (notificationId: string): Promise<void> => {
await MonitorModel.updateMany({ notifications: notificationId }, { $pull: { notifications: notificationId } });
};
private mapDocuments = (documents: MonitorDocument[]): Monitor[] => {
if (!documents?.length) {
return [];