fix: #9822, use correct username/pwd

isekai-main
Barış Soner Uşaklı 3 years ago
parent 2add84a568
commit 30f387710c

@ -12,7 +12,7 @@ connection.getConnectionString = function (mongo) {
let usernamePassword = '';
const uri = mongo.uri || '';
if (mongo.username && mongo.password) {
usernamePassword = `${nconf.get('mongo:username')}:${encodeURIComponent(nconf.get('mongo:password'))}@`;
usernamePassword = `${mongo.username}:${encodeURIComponent(mongo.password)}@`;
} else if (!uri.includes('@') || !uri.slice(uri.indexOf('://') + 3, uri.indexOf('@'))) {
winston.warn('You have no mongo username/password setup!');
}

Loading…
Cancel
Save