chore: up mongo deps (#11375)

* chore: up mongo deps

* mongodb 5.x no more callbacks
This commit is contained in:
Barış Soner Uşaklı
2023-03-17 14:36:04 -04:00
committed by GitHub
parent 75436dc02c
commit 5db037f1ea
2 changed files with 4 additions and 5 deletions

View File

@@ -173,9 +173,8 @@ async function getCollectionStats(db) {
return await Promise.all(items.map(collection => db.collection(collection.name).stats()));
}
mongoModule.close = function (callback) {
callback = callback || function () {};
client.close(err => callback(err));
mongoModule.close = async function () {
await client.close();
};
require('./mongo/main')(mongoModule);