mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-20 16:49:46 -06:00
Error handling removed
This commit is contained in:
@@ -44,15 +44,9 @@ const getChecks = async (req, res, next) => {
|
||||
|
||||
try {
|
||||
const checks = await req.db.getChecks(req.params.monitorId);
|
||||
if (checks) {
|
||||
return res
|
||||
.status(200)
|
||||
.json({ success: true, msg: successMessages.CHECK_GET, data: checks });
|
||||
} else {
|
||||
return res
|
||||
.status(404)
|
||||
.json({ success: false, msg: errorMessages.CHECKS_NOT_FOUND, data: [] })
|
||||
}
|
||||
return res
|
||||
.status(200)
|
||||
.json({ success: true, msg: successMessages.CHECK_GET, data: checks });
|
||||
} catch (error) {
|
||||
error.service = SERVICE_NAME;
|
||||
next(error);
|
||||
|
||||
Reference in New Issue
Block a user