Only send relevant server data to frontend

This commit is contained in:
Björn Dahlgren 2014-06-04 23:25:05 +02:00
parent b6513b6d50
commit 1cfaab7992

View File

@ -64,14 +64,23 @@ exports.update = function(req, res){
playwithsix.resolveDependencies(modsToResolve, function (err, mods) {
if (!err && mods) {
server.mods = removeDuplicates(server.mods.concat(mods));
manager.save();
}
manager.save();
res.send(server);
res.send({
id: server.id,
title: server.title,
port: server.port,
mods: server.mods,
});
});
} else {
manager.save();
res.send(server);
res.send({
id: server.id,
title: server.title,
port: server.port,
mods: server.mods,
});
}
};