refactor notifications service
This commit is contained in:
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 [];
|
||||
|
||||
Reference in new issue
Block a user