add delete checks method
This commit is contained in:
1 parent
82c9a7331b
commit
ca6e40042a
1 file changed
+12
-1
@@ -12,4 +12,15 @@ const createDistributedCheck = async (checkData) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export { createDistributedCheck };
|
const deleteDistributedChecksByMonitorId = async (monitorId) => {
|
||||||
|
try {
|
||||||
|
const result = await DistributedUptimeCheck.deleteMany({ monitorId });
|
||||||
|
return result.deletedCount;
|
||||||
|
} catch (error) {
|
||||||
|
error.service = SERVICE_NAME;
|
||||||
|
error.method = "deleteDistributedChecksByMonitorId";
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export { createDistributedCheck, deleteDistributedChecksByMonitorId };
|
||||||
Reference in new issue
Block a user