Skip to content
Snippets Groups Projects
Unverified Commit 61dcd518 authored by syuilo's avatar syuilo
Browse files

Revert "Fix bug"

This reverts commit 2ef795ab.
parent 5448c220
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,8 @@ const requiredMongoDBVersion = [3, 6];
export function checkMongoDB(config: Config, logger: Logger) {
return new Promise((res, rej) => {
const mongoDBLogger = logger.createSubLogger('db');
const u = config.mongodb.user.map(x => encodeURIComponent(x)).getOrElse(null);
const p = config.mongodb.pass.map(x => encodeURIComponent(x)).getOrElse(null);
const u = config.mongodb.user ? encodeURIComponent(config.mongodb.user) : null;
const p = config.mongodb.pass ? encodeURIComponent(config.mongodb.pass) : null;
const uri = `mongodb://${u && p ? `${u}:****@` : ''}${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`;
mongoDBLogger.info(`Connecting to ${uri} ...`);
......
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