From ca5836e07a99f4f8fecf8c026e029048bdfa2011 Mon Sep 17 00:00:00 2001 From: M-Vamshi <21211a05f1@bvrit.ac.in> Date: Sat, 23 Mar 2024 19:29:31 +0530 Subject: [PATCH] fix import data Signed-off-by: M-Vamshi <21211a05f1@bvrit.ac.in> --- package-lock.json | 2 +- package.json | 2 +- setup.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2f828d5f74..1c0b80b077 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "jwt-decode": "^4.0.0", "lodash": "^4.17.21", "markdown-toc": "^1.2.0", - "mongodb": "6.3.0", + "mongodb": "^6.3.0", "mongoose": "^8.2.0", "mongoose-paginate-v2": "^1.8.0", "morgan": "^1.10.0", diff --git a/package.json b/package.json index bf82356da3..85a3d40b32 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "jwt-decode": "^4.0.0", "lodash": "^4.17.21", "markdown-toc": "^1.2.0", - "mongodb": "6.3.0", + "mongodb": "^6.3.0", "mongoose": "^8.2.0", "mongoose-paginate-v2": "^1.8.0", "morgan": "^1.10.0", diff --git a/setup.ts b/setup.ts index 2f5985f045..bc7ff108f4 100644 --- a/setup.ts +++ b/setup.ts @@ -7,7 +7,7 @@ import path from "path"; /* eslint-disable */ import type { ExecException } from "child_process"; import { exec } from "child_process"; -import mongodb from "mongodb"; +import mongodb, { MongoClient } from "mongodb"; import { MAXIMUM_IMAGE_SIZE_LIMIT_KB } from "./src/constants"; import { askForMongoDBUrl, @@ -210,7 +210,7 @@ async function askForTransactionLogPath(): Promise { */ export async function shouldWipeExistingData(url: string): Promise { let shouldImport = false; - const client = new mongodb.MongoClient(url); + const client = new MongoClient(`${url}`); try { await client.connect(); const db = client.db();