Make sure pid is returned and fixed cyclic dependencies when fetching a single server

This commit is contained in:
Björn Dahlgren 2014-04-09 00:08:36 +02:00
parent 39bbe2e0c9
commit 3e34850e44

View File

@ -13,7 +13,8 @@ exports.index = function (req, res){
title: server.title,
port: server.port,
mods: server.mods,
})
pid: server.pid,
});
});
res.send(servers);
@ -26,7 +27,14 @@ exports.create = function (req, res){
};
exports.show = function (req, res){
res.send(manager.getServer(req.params.server));
var server = manager.getServer(req.params.server)
res.send({
id: server.id,
title: server.title,
port: server.port,
mods: server.mods,
pid: server.pid,
});
};
exports.update = function(req, res){