HTTP node not closeing properly

This commit is contained in:
Nicholas O'Leary 2013-09-18 09:21:12 +01:00
parent 1d4adecaa0
commit 62e7b253c9
1 changed files with 4 additions and 2 deletions

View File

@ -37,15 +37,17 @@ function HTTPIn(n) {
}
}
RED.nodes.registerType("http in",HTTPIn);
HTTPIn.prototype.close = function() {
var routes = redUI.app.routes[this.method];
console.log(RED.app.routes[this.method]);
var routes = RED.app.routes[this.method];
for (var i in routes) {
if (routes[i].path == this.url) {
routes.splice(i,1);
break;
}
}
console.log(RED.app.routes[this.method]);
}
RED.nodes.registerType("http in",HTTPIn);