Remove save call from backfilling trusted ips

This commit is contained in:
Tuan Dang
2023-07-26 16:18:13 +07:00
parent ad33356994
commit 7da6d72f13
+2 -2
View File
@@ -572,13 +572,13 @@ export const backfillTrustedIps = async () => {
const trustedIpsToInsert = workspaceIdsToAddTrustedIp.map((workspaceId) => { const trustedIpsToInsert = workspaceIdsToAddTrustedIp.map((workspaceId) => {
return new TrustedIP({ return new TrustedIP({
workspace: new Types.ObjectId(workspaceId), workspace: workspaceId,
ipAddress: "0.0.0.0", ipAddress: "0.0.0.0",
type: IPType.IPV4, type: IPType.IPV4,
prefix: 0, prefix: 0,
isActive: true, isActive: true,
comment: "", comment: "",
}).save(); });
}); });
await TrustedIP.insertMany(trustedIpsToInsert); await TrustedIP.insertMany(trustedIpsToInsert);