Merge pull request #329 from bluewave-labs/fix/get-monitors-404

Removed 404 error thrown when user has no monitors to display
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-07-13 15:04:13 -07:00
commit c5eb9fc15f
1 file changed
-6
-6
View File
@@ -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),