syuilo 2017-12-31 15:15:19 +09:00
parent 59c64ba7d9
commit deb86bf6e5
1 changed files with 2 additions and 2 deletions

View File

@ -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));
});
}))();