1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Incorrect credentials in mongo node

Closes #386
This commit is contained in:
Nick O'Leary 2014-09-08 19:24:06 +01:00
parent c03db99a21
commit 1a5a548fbf

View File

@ -27,8 +27,8 @@ module.exports = function(RED) {
this.name = n.name;
var url = "mongodb://";
if (this.credentials && this.credentials.username && this.credentials.password) {
url += this.credentials.username+":"+this.credentials.password+"@";
if (this.credentials && this.credentials.user && this.credentials.password) {
url += this.credentials.user+":"+this.credentials.password+"@";
}
url += this.hostname+":"+this.port+"/"+this.db;