mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Tweak the credential handling
- use node.credentials rather than node._creds for consistency with the runtime - simplify the structure of node.credentials
This commit is contained in:
@@ -45,12 +45,11 @@ var parseCredentials = function (config) {
|
||||
for (var i in config) {
|
||||
if (config.hasOwnProperty(i)) {
|
||||
var node = config[i];
|
||||
if (!node._creds) {
|
||||
continue;
|
||||
if (node.credentials) {
|
||||
var type = node.type;
|
||||
credentials.merge(node.id, type, node.credentials);
|
||||
delete node.credentials;
|
||||
}
|
||||
var type = node.type;
|
||||
credentials.merge(node.id, type, node._creds);
|
||||
delete node._creds;
|
||||
}
|
||||
}
|
||||
credentials.save().then(function () {
|
||||
|
Reference in New Issue
Block a user