From a16a7a773ce3a0fd83df1528f03f567563275cb5 Mon Sep 17 00:00:00 2001 From: ui_creeperlv Date: Thu, 14 Mar 2024 20:26:28 +0530 Subject: [PATCH] add async to .catch in createStore --- database/mongod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/mongod.js b/database/mongod.js index 66ab4eb..71d9dec 100644 --- a/database/mongod.js +++ b/database/mongod.js @@ -12,7 +12,7 @@ module.exports.initMongoDBInstance = async (client,config,callback) => { createStore: async (name, callback) => { db.createCollection(name).then(async () => { await callback(true); - }).catch(() => { + }).catch(async () => { await callback(false); }) },