mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Allow credentials to be provided as part of /flows api
This commit is contained in:
@@ -57,6 +57,8 @@ var api = module.exports = {
|
||||
* Sets the current flow configuration
|
||||
* @param {Object} opts
|
||||
* @param {User} opts.user - the user calling the api
|
||||
* @param {Object} opts.flows - the flow configuration: `{flows: [..], credentials: {}}`
|
||||
* @param {Object} opts.deploymentType - the type of deployment - "full", "nodes", "flows", "reload"
|
||||
* @param {Object} opts.req - the request to log (optional)
|
||||
* @return {Promise<Flows>} - the active flow configuration
|
||||
* @memberof @node-red/runtime_flows
|
||||
@@ -83,7 +85,7 @@ var api = module.exports = {
|
||||
return reject(err);
|
||||
}
|
||||
}
|
||||
apiPromise = runtime.nodes.setFlows(flows.flows,deploymentType);
|
||||
apiPromise = runtime.nodes.setFlows(flows.flows,flows.credentials,deploymentType);
|
||||
}
|
||||
apiPromise.then(function(flowId) {
|
||||
return resolve({rev:flowId});
|
||||
|
Reference in New Issue
Block a user