Add tests for getMonitorById

This commit is contained in:
Alex Holliday committed 2024-10-11 15:07:37 +08:00
1 parent 3e23d97930
commit 586b18d295
2 files changed
+63 -3

No files matched your search

+2 -1
View File
@@ -130,9 +130,10 @@ const getMonitorById = async (req, res, next) => {
if (!monitor) {
const error = new Error(errorMessages.MONITOR_GET_BY_ID);
error.status = 404;
throw error;
}
return res.json({
return res.status(200).json({
success: true,
msg: successMessages.MONITOR_GET_BY_ID,
data: monitor,