mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-03 23:19:37 -05:00
remove monitors from status page on delete
This commit is contained in:
@@ -710,9 +710,11 @@ const deleteMonitor = async ({ monitorId }) => {
|
||||
const stringService = ServiceRegistry.get(StringService.SERVICE_NAME);
|
||||
try {
|
||||
const monitor = await Monitor.findByIdAndDelete(monitorId);
|
||||
|
||||
if (!monitor) {
|
||||
throw new Error(stringService.getDbFindMonitorById(monitorId));
|
||||
}
|
||||
|
||||
return monitor;
|
||||
} catch (error) {
|
||||
error.service = SERVICE_NAME;
|
||||
|
||||
Reference in New Issue
Block a user