mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-31 06:10:07 -06:00
add delete checks method
This commit is contained in:
@@ -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