mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 09:17:30 -05:00
add clientCount back to system list
This commit is contained in:
@@ -152,6 +152,14 @@ exports.get_systems = async function (req, res) {
|
|||||||
await load_systems(req.systemClients);
|
await load_systems(req.systemClients);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
const systemClients = req.systemClients || {};
|
||||||
|
for (var i = 0; i < systemList.length; i++) {
|
||||||
|
var system = systemList[i];
|
||||||
|
var shortName = system.shortName;
|
||||||
|
if (systemClients.hasOwnProperty(shortName)) {
|
||||||
|
system.clientCount = systemClients[shortName];
|
||||||
|
}
|
||||||
|
}
|
||||||
res.contentType('json');
|
res.contentType('json');
|
||||||
res.send(JSON.stringify({
|
res.send(JSON.stringify({
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user