mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Tidy up ajax usage
This commit is contained in:
parent
b6fd103b37
commit
b5a8a7288b
@ -98,9 +98,6 @@ var RED = function() {
|
|||||||
RED.view.redraw();
|
RED.view.redraw();
|
||||||
}).fail(function(xhr,textStatus,err) {
|
}).fail(function(xhr,textStatus,err) {
|
||||||
RED.view.dirty(true);
|
RED.view.dirty(true);
|
||||||
console.log(xhr);
|
|
||||||
console.log(textStatus);
|
|
||||||
console.log(err);
|
|
||||||
if (xhr.responseText) {
|
if (xhr.responseText) {
|
||||||
RED.notify("<strong>Error</strong>: "+xhr.responseText,"error");
|
RED.notify("<strong>Error</strong>: "+xhr.responseText,"error");
|
||||||
} else {
|
} else {
|
||||||
|
@ -49,8 +49,8 @@ function createServer(_server,_settings) {
|
|||||||
function(req,res) {
|
function(req,res) {
|
||||||
var flows = req.body;
|
var flows = req.body;
|
||||||
storage.saveFlows(flows).then(function() {
|
storage.saveFlows(flows).then(function() {
|
||||||
res.json(204);
|
res.json(204);
|
||||||
redNodes.setConfig(flows);
|
redNodes.setConfig(flows);
|
||||||
}).otherwise(function(err) {
|
}).otherwise(function(err) {
|
||||||
util.log("[red] Error saving flows : "+err);
|
util.log("[red] Error saving flows : "+err);
|
||||||
res.send(500,err.message);
|
res.send(500,err.message);
|
||||||
|
Loading…
Reference in New Issue
Block a user