Skip to content

Commit

Permalink
add clientCount back to system list
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Sep 1, 2024
1 parent 336e520 commit a674e92
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/controllers/systems.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ exports.get_systems = async function (req, res) {
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.send(JSON.stringify({
success: true,
Expand Down

0 comments on commit a674e92

Please sign in to comment.