mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Use HTTP body instead of header for setting flows run state
This commit is contained in:
@@ -83,7 +83,7 @@ module.exports = {
|
||||
postState: function(req,res) {
|
||||
const opts = {
|
||||
user: req.user,
|
||||
requestedState: req.get("Node-RED-Flow-Run-State-Change")||"",
|
||||
requestedState: req.body.state||"",
|
||||
req: apiUtils.getRequestLogObject(req)
|
||||
}
|
||||
runtimeAPI.flows.setState(opts).then(function(result) {
|
||||
|
@@ -306,10 +306,7 @@ RED.deploy = (function() {
|
||||
$.ajax({
|
||||
url:"flows/state",
|
||||
type: "POST",
|
||||
data: {state: state},
|
||||
headers: {
|
||||
"Node-RED-Flow-Run-State-Change": state
|
||||
}
|
||||
data: {state: state}
|
||||
}).done(function(data,textStatus,xhr) {
|
||||
if (deployWasEnabled) {
|
||||
$("#red-ui-header-button-deploy").removeClass("disabled");
|
||||
|
Reference in New Issue
Block a user