From c9b66b1bd6637d5d6727ea16bcdd8207102c219b Mon Sep 17 00:00:00 2001 From: william Date: Fri, 22 Apr 2016 14:39:35 -0400 Subject: [PATCH] crunner --- routes/api.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routes/api.js b/routes/api.js index 2074b3a..9e4e483 100644 --- a/routes/api.js +++ b/routes/api.js @@ -28,9 +28,10 @@ var lxcTimeout = function(ip, time){ var runner = function(req, res, ip){ + console.log('ip:', ip); lxcTimeout(ip); - console.log('code to run:\n', req.body); - return request.post({url:'http://'+ip, body: req.body }, function(error, response, body){ + console.log('code to run:\n', req.body.code); + return request.post({url:'http://'+ip, body: {code: req.body.code} }, function(error, response, body){ console.log(body); // body = JSON.parse(body); body['ip'] = ip.replace('10.0.', '');