Add methods to MongoDB
This commit is contained in:
1 parent
a7c93aee39
commit
03ee67cfca
2 files changed
+8
No files matched your search
@@ -158,6 +158,7 @@ const deleteMonitor = async (req, res, next) => {
|
|||||||
await req.jobQueue.deleteJob(monitor);
|
await req.jobQueue.deleteJob(monitor);
|
||||||
await req.db.deleteChecks(monitor._id);
|
await req.db.deleteChecks(monitor._id);
|
||||||
await req.db.deleteAlertByMonitorId(monitor._id);
|
await req.db.deleteAlertByMonitorId(monitor._id);
|
||||||
|
await req.db.deleteNotificationByMonitorId(monitor._id);
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
* We should remove all checks and alerts associated with this monitor
|
* We should remove all checks and alerts associated with this monitor
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ const {
|
|||||||
deleteMaintenanceWindowByUserId,
|
deleteMaintenanceWindowByUserId,
|
||||||
} = require("./modules/maintenaceWindowModule");
|
} = require("./modules/maintenaceWindowModule");
|
||||||
|
|
||||||
|
const {
|
||||||
|
createNotification,
|
||||||
|
getNotificationsByMonitorId,
|
||||||
|
} = require("./modules/notificationModule");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
connect,
|
connect,
|
||||||
insertUser,
|
insertUser,
|
||||||
@@ -162,4 +167,6 @@ module.exports = {
|
|||||||
deleteMaintenaceWindowById,
|
deleteMaintenaceWindowById,
|
||||||
deleteMaintenanceWindowByMonitorId,
|
deleteMaintenanceWindowByMonitorId,
|
||||||
deleteMaintenanceWindowByUserId,
|
deleteMaintenanceWindowByUserId,
|
||||||
|
createNotification,
|
||||||
|
getNotificationsByMonitorId,
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user