From ac7b912b45421f040046b33c6fdb83d36548a318 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Tue, 11 Nov 2025 23:33:57 +1100 Subject: [PATCH] BE: link to server in reports #1267, new /tmp/api path for SYNC plugin Signed-off-by: jokob-sk --- front/report_templates/report_template.html | 4 ++-- server/api_server/sync_endpoint.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/front/report_templates/report_template.html b/front/report_templates/report_template.html index 920d9156..58c600bd 100755 --- a/front/report_templates/report_template.html +++ b/front/report_templates/report_template.html @@ -26,8 +26,8 @@ NEW_VERSION - | Sent: REPORT_DATE - | Server: SERVER_NAME + | Sent: REPORT_DATE + | Server: SERVER_NAME | Built: BUILD_DATE | Version: BUILD_VERSION diff --git a/server/api_server/sync_endpoint.py b/server/api_server/sync_endpoint.py index 883a8645..d756d286 100755 --- a/server/api_server/sync_endpoint.py +++ b/server/api_server/sync_endpoint.py @@ -11,7 +11,11 @@ INSTALL_PATH = os.getenv("NETALERTX_APP", "/app") def handle_sync_get(): """Handle GET requests for SYNC (NODE → HUB).""" - file_path = INSTALL_PATH + "/api/table_devices.json" + + # get all dwevices from the api endpoint + api_path = os.environ.get('NETALERTX_API', '/tmp/api') + + file_path = f"/{api_path}/table_devices.json" try: with open(file_path, "rb") as f: