mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-04-25 02:18:21 -05:00
Removal of n count of document.
This commit is contained in:
@@ -5,14 +5,7 @@ const SERVICE_NAME = "networkCheckModule";
|
||||
|
||||
const createNetworkCheck = async (networkCheckData) => {
|
||||
try {
|
||||
const { monitorId, status } = networkCheckData;
|
||||
const n = (await NetworkCheck.countDocuments({ monitorId })) + 1;
|
||||
|
||||
const networkCheck = await new NetworkCheck({
|
||||
...networkCheckData,
|
||||
n,
|
||||
});
|
||||
|
||||
const networkCheck = await new NetworkCheck(networkCheckData);
|
||||
await networkCheck.save();
|
||||
return networkCheck;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user