Add controller method for uptime details

This commit is contained in:
Alex Holliday
2024-12-30 14:56:50 -08:00
parent d9c583f972
commit 0551eb010d

View File

@@ -74,6 +74,19 @@ class MonitorController {
}
};
getUptimeDetailsById = async (req, res, next) => {
try {
const monitor = await this.db.getUptimeDetailsById(req);
return res.status(200).json({
success: true,
msg: successMessages.MONITOR_GET_BY_ID,
data: monitor,
});
} catch (error) {
next(handleError(error, SERVICE_NAME, "getMonitorDetailsById"));
}
};
/**
* Returns monitor stats for monitor with matching ID
* @async