Skip to content
Snippets Groups Projects
Commit deb86bf6 authored by syuilo's avatar syuilo
Browse files
parent 59c64ba7
No related branches found
No related tags found
No related merge requests found
......@@ -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));
});
}))();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment