diff --git a/lxc.js b/lxc.js index beee9ed..a791772 100644 --- a/lxc.js +++ b/lxc.js @@ -120,7 +120,7 @@ module.exports = function(config){ info.push(mapOut); } - + console.log('info:', info) cbData(info); }); }; diff --git a/routes/index.js b/routes/index.js index 45f0b1d..fc21a57 100644 --- a/routes/index.js +++ b/routes/index.js @@ -72,9 +72,7 @@ router.get('/info/:name', function(req, res, next){ }); router.get('/list', function(req, res, next) { - lxc.list(function(data){ - res.json(data); - }); + lxc.list(res.json(data)); }); module.exports = router;