Removal of n count of document.

This commit is contained in:
Owaise Imdad
2025-06-21 00:18:09 +05:30
parent 24cb4c70a7
commit 9700551f41
@@ -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) {