runner
This commit is contained in:
parent
1a1cc28158
commit
3bc57876ad
@ -84,9 +84,10 @@ router.get('/list', function(req, res, next) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
router.post('/run', function(req, res, next){
|
router.post('/run/:ip?', function(req, res, next){
|
||||||
var runner = function(res, req, ip){
|
var runner = function(res, req, ip){
|
||||||
request.post({url:'http://'+ip, body:req.post}, function(error, response, body){
|
request.post({url:'http://'+ip, body:req.post}, function(error, response, body){
|
||||||
|
console.log('runner body:', body)
|
||||||
body = JSON.parse(body);
|
body = JSON.parse(body);
|
||||||
body['ip'] = ip.replace('10.0.', '')
|
body['ip'] = ip.replace('10.0.', '')
|
||||||
return res.json(body)
|
return res.json(body)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user