From b5a8a7288b15f1b93af377b679725c9658995920 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 15 Apr 2014 22:30:07 +0100 Subject: [PATCH] Tidy up ajax usage --- public/red/main.js | 3 --- red/server.js | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/public/red/main.js b/public/red/main.js index bbe92cce5..5722f2e38 100644 --- a/public/red/main.js +++ b/public/red/main.js @@ -98,9 +98,6 @@ var RED = function() { RED.view.redraw(); }).fail(function(xhr,textStatus,err) { RED.view.dirty(true); - console.log(xhr); - console.log(textStatus); - console.log(err); if (xhr.responseText) { RED.notify("Error: "+xhr.responseText,"error"); } else { diff --git a/red/server.js b/red/server.js index 3becb9b16..6ddaf569e 100644 --- a/red/server.js +++ b/red/server.js @@ -49,8 +49,8 @@ function createServer(_server,_settings) { function(req,res) { var flows = req.body; storage.saveFlows(flows).then(function() { - res.json(204); - redNodes.setConfig(flows); + res.json(204); + redNodes.setConfig(flows); }).otherwise(function(err) { util.log("[red] Error saving flows : "+err); res.send(500,err.message);