mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add credential extract unit tests
This commit is contained in:
@@ -63,11 +63,9 @@ function registerEndpoint(type) {
|
||||
|
||||
|
||||
module.exports = {
|
||||
init: function (_storage) {
|
||||
init: function (_storage,_app) {
|
||||
storage = _storage;
|
||||
// TODO: this should get passed in init function call rather than
|
||||
// required directly.
|
||||
redApp = require("../server").app;
|
||||
redApp = _app;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -166,7 +164,6 @@ module.exports = {
|
||||
var newCreds = node.credentials;
|
||||
if (newCreds) {
|
||||
var savedCredentials = credentialCache[nodeID] || {};
|
||||
|
||||
var dashedType = nodeType.replace(/\s+/g, '-');
|
||||
var definition = credentialsDef[dashedType];
|
||||
if (!definition) {
|
||||
|
@@ -50,8 +50,8 @@ function createNode(node,def) {
|
||||
}
|
||||
}
|
||||
|
||||
function init(_settings,storage) {
|
||||
credentials.init(storage);
|
||||
function init(_settings,storage,app) {
|
||||
credentials.init(storage,app);
|
||||
flows.init(storage);
|
||||
registry.init(_settings);
|
||||
}
|
||||
|
Reference in New Issue
Block a user