Removal of n count of document.

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