From 8a16e1ea149097588acf132b02e0d4e439ad344d Mon Sep 17 00:00:00 2001 From: Saransh Balyan Date: Tue, 27 Aug 2024 21:52:55 +0530 Subject: [PATCH] fix --- Utils/Database/mongo.connection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utils/Database/mongo.connection.js b/Utils/Database/mongo.connection.js index 697d9b9..dce13b4 100644 --- a/Utils/Database/mongo.connection.js +++ b/Utils/Database/mongo.connection.js @@ -18,7 +18,7 @@ const registerAllPlugins = async () => { const files = getDirectories('.', 'plugin'); for (const file of files) { - const schema = await import(file); + const schema = await import("../../"+file); const defaultFile = schema.default; mongoose.plugin(defaultFile); }; @@ -65,7 +65,7 @@ const registerAllSchema = async (db) => { try { const files = getDirectories('.', 'schema'); for (const file of files) { - const schema = await import(file); + const schema = await import("../../"+file); const defaultFile = schema.default; const tempAr = file.split('.');