BE: link to server in reports #1267, new /tmp/api path for SYNC plugin
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-11-11 23:33:57 +11:00
parent 62852f1b2f
commit ac7b912b45
2 changed files with 7 additions and 3 deletions

View File

@@ -11,7 +11,11 @@ INSTALL_PATH = os.getenv("NETALERTX_APP", "/app")
def handle_sync_get(): def handle_sync_get():
"""Handle GET requests for SYNC (NODE → HUB).""" """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: try:
with open(file_path, "rb") as f: with open(file_path, "rb") as f: