fixed database.ts

pull/102/head
TheCodedProf 3 years ago
parent 5802ba654b
commit c8054aea7a
No known key found for this signature in database
GPG Key ID: 803E7CCB5577E6A2

@ -21,7 +21,8 @@ if ("password" in config.mongoOptions) password = encodeURIComponent(config.mong
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();

Loading…
Cancel
Save