diff --git a/src/utilities/SimpleMongoWrapper.js b/src/utilities/SimpleMongoWrapper.js index b254f64..20202a7 100644 --- a/src/utilities/SimpleMongoWrapper.js +++ b/src/utilities/SimpleMongoWrapper.js @@ -24,7 +24,7 @@ class MongoDB { } URI(database) { - return `mongodb://${this._auth}${this.config.host}/${database}?authSource=${database}`; + return `mongodb://${this._auth}${this.config.host}/${database}${this._auth.length ? `?authSource=${database}` : ''}`; } async init() {