From deb86bf6e5fce7d97e449a1f7f2a7db48915a03d Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 31 Dec 2017 15:15:19 +0900 Subject: [PATCH] Fix bug SEE: https://github.com/mongodb/node-mongodb-native/blob/3.0.0/CHANGES_3.0.0.md --- src/db/mongodb.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db/mongodb.ts b/src/db/mongodb.ts index be234b3650..1263ccaacd 100644 --- a/src/db/mongodb.ts +++ b/src/db/mongodb.ts @@ -24,9 +24,9 @@ const nativeDbConn = async (): Promise => { if (mdb) return mdb; const db = await ((): Promise => 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)); }); }))();