mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
Fix bug
SEE: https://github.com/mongodb/node-mongodb-native/blob/3.0.0/CHANGES_3.0.0.md
This commit is contained in:
parent
3831e36589
commit
f1416f785a
1 changed files with 2 additions and 2 deletions
|
@ -24,9 +24,9 @@ const nativeDbConn = async (): Promise<mongodb.Db> => {
|
|||
if (mdb) return mdb;
|
||||
|
||||
const db = await ((): Promise<mongodb.Db> => new Promise((resolve, reject) => {
|
||||
mongodb.MongoClient.connect(uri, (e, db) => {
|
||||
(mongodb as any).MongoClient.connect(uri, (e, client) => {
|
||||
if (e) return reject(e);
|
||||
resolve(db);
|
||||
resolve(client.db(config.mongodb.db));
|
||||
});
|
||||
}))();
|
||||
|
||||
|
|
Loading…
Reference in a new issue