From b69fc223bf6619871f204f09fb13f93fc08afe86 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 24 Oct 2024 11:42:18 +0800 Subject: [PATCH] remove redundant check --- Server/controllers/monitorController.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Server/controllers/monitorController.js b/Server/controllers/monitorController.js index ea74a2465..eaed33c81 100644 --- a/Server/controllers/monitorController.js +++ b/Server/controllers/monitorController.js @@ -121,12 +121,6 @@ const getMonitorById = async (req, res, next) => { try { const monitor = await req.db.getMonitorById(req.params.monitorId); - if (!monitor) { - const error = new Error(errorMessages.MONITOR_GET_BY_ID); - error.status = 404; - throw error; - } - return res.status(200).json({ success: true, msg: successMessages.MONITOR_GET_BY_ID,