diff --git a/Server/controllers/monitorController.js b/Server/controllers/monitorController.js index ac4e92da7..37aff6c96 100644 --- a/Server/controllers/monitorController.js +++ b/Server/controllers/monitorController.js @@ -303,7 +303,8 @@ const editMonitor = async (req, res, next) => { } try { - const monitorBeforeEdit = await req.db.getMonitorById(req, res); + const { monitorId } = req.params; + const monitorBeforeEdit = await req.db.getMonitorById(monitorId); // Get notifications from the request body const notifications = req.body.notifications;