remove redundant check

This commit is contained in:
Alex Holliday committed 2024-10-24 11:42:18 +08:00
1 parent 084315c377
commit b69fc223bf
1 file changed
-6
-6
View File
@@ -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,