remove monitors from status page on delete

This commit is contained in:
Alex Holliday
2025-06-13 14:54:59 +08:00
parent cc8949538f
commit 4b621a228f
10 changed files with 47 additions and 9 deletions
+2
View File
@@ -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;