From 38102d1e7b93b4f0759769272fdf6c128507d94a Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 12 Jul 2024 11:30:36 -0700 Subject: [PATCH] Removed 404 error thrown when user has no monitors to display --- Server/controllers/monitorController.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Server/controllers/monitorController.js b/Server/controllers/monitorController.js index 3cb1711c7..52433c8d7 100644 --- a/Server/controllers/monitorController.js +++ b/Server/controllers/monitorController.js @@ -87,12 +87,6 @@ const getMonitorsByUserId = async (req, res, next) => { const userId = req.params.userId; const monitors = await req.db.getMonitorsByUserId(req, res); - if (monitors && monitors.length === 0) { - const err = new Error(errorMessages.MONITOR_GET_BY_USER_ID); - err.status = 404; - throw err; - } - return res.json({ success: true, msg: successMessages.MONITOR_GET_BY_USER_ID(userId),