mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-15 14:19:41 -06:00
Add methods to MongoDB
This commit is contained in:
@@ -158,6 +158,7 @@ const deleteMonitor = async (req, res, next) => {
|
||||
await req.jobQueue.deleteJob(monitor);
|
||||
await req.db.deleteChecks(monitor._id);
|
||||
await req.db.deleteAlertByMonitorId(monitor._id);
|
||||
await req.db.deleteNotificationByMonitorId(monitor._id);
|
||||
/**
|
||||
* TODO
|
||||
* We should remove all checks and alerts associated with this monitor
|
||||
|
||||
@@ -120,6 +120,11 @@ const {
|
||||
deleteMaintenanceWindowByUserId,
|
||||
} = require("./modules/maintenaceWindowModule");
|
||||
|
||||
const {
|
||||
createNotification,
|
||||
getNotificationsByMonitorId,
|
||||
} = require("./modules/notificationModule");
|
||||
|
||||
module.exports = {
|
||||
connect,
|
||||
insertUser,
|
||||
@@ -162,4 +167,6 @@ module.exports = {
|
||||
deleteMaintenaceWindowById,
|
||||
deleteMaintenanceWindowByMonitorId,
|
||||
deleteMaintenanceWindowByUserId,
|
||||
createNotification,
|
||||
getNotificationsByMonitorId,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user