|
|
|
@ -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!');
|
|
|
|
|
}
|
|
|
|
|