Skip to content

Commit 4f61354

Browse files
committed
Merge branch 'release-5.0.5'
2 parents d9395ad + 6ee6f24 commit 4f61354

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
const path = require('path')
22

3-
module.exports = require(
4-
path.join(__dirname, 'lib')
5-
)
3+
module.exports = require(path.join(__dirname, 'lib'))
64

75
module.exports.settings = {
86
connectWithCollection: true,

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ DataStore.prototype.getConnectionString = function({
610610
credentials = `${username}:${password}@`
611611

612612
if (authDatabase) {
613-
options.authDatabase = authDatabase
613+
options.authSource = authDatabase
614614
}
615615

616616
if (authMechanism) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dadi/api-mongodb",
3-
"version": "5.0.4",
3+
"version": "5.0.5",
44
"description": "A MongoDB adapter for DADI API",
55
"keywords": [
66
"dadi",

test/unit/connect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ describe('MongoDB connection', function() {
288288
connectionString1.should.eql('mongodb://123.456.78.9:1234/somedb1')
289289
connectionString2.should.eql('mongodb://123.456.78.9:1234/somedb2')
290290
connectionString3.should.eql(
291-
'mongodb://johndoe:[email protected]:1234/somedb3?authDatabase=myauth'
291+
'mongodb://johndoe:[email protected]:1234/somedb3?authSource=myauth'
292292
)
293293
})
294294

0 commit comments

Comments
 (0)