summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/efa-gw6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/efa-gw b/bin/efa-gw
index 4d92e2c..d56604c 100755
--- a/bin/efa-gw
+++ b/bin/efa-gw
@@ -42,14 +42,16 @@ async def handle_eva(request):
) as response:
content = await response.text()
content = json.loads(content)
- reply = dict()
+ train_data = dict()
for train in content["raw"]:
if train["train_no"]:
- reply[train["train_no"]] = {
+ train_data[train["train_no"]] = {
"occupancy": get_occupancy(train["occupancy"])
}
+ reply = {"train": train_data}
+
return web.Response(body=json.dumps(reply), headers=headers)