From fb4e5cd60790b663256b049318d40f372a122ebe Mon Sep 17 00:00:00 2001 From: zeim839 Date: Wed, 1 May 2024 11:04:02 +0400 Subject: [PATCH] fix: return connection promise --- utils/database.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/database.js b/utils/database.js index 58c0ce3..add5f8d 100644 --- a/utils/database.js +++ b/utils/database.js @@ -27,7 +27,7 @@ process.on('SIGINT', (error, data) => { }) exports.connect = () => { - mongoose.connect(url, { useNewUrlParser: true, useUnifiedTopology: true }) + return mongoose.connect(url, { useNewUrlParser: true, useUnifiedTopology: true }) } exports.disconnect = () => {