fixed database.ts (#102)
diff --git a/src/utils/database.ts b/src/utils/database.ts
index 8ad2fb3..1bb1904 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -21,7 +21,8 @@
const mongoClient = new MongoClient(
username
- ? `mongodb://${username}:${password}@${config.mongoOptions.host}?authMechanism=DEFAULT&authSource=${config.mongoOptions.authSource}`
+ ? `mongodb://${username}:${password}@${config.mongoOptions.host}/${config.mongoOptions.database}` +
+ `?authMechanism=DEFAULT&authSource=${config.mongoOptions.authSource}`
: `mongodb://${config.mongoOptions.host}`
);
await mongoClient.connect();