From adadd1c62b2af952f3a3bb5625f948ec2bf9ddfc Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 29 Jun 2025 22:18:53 -0400 Subject: [PATCH] Add active client object to status endpoint --- app/routers/nodes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/routers/nodes.py b/app/routers/nodes.py index 7c1aad9..93f32bf 100644 --- a/app/routers/nodes.py +++ b/app/routers/nodes.py @@ -179,7 +179,10 @@ async def status(client_id): try: # Send the command and wait for a response status_data = await send_command_to_client(client_id, NodeCommands.STATUS, wait_for_response=True, timeout=5) - return jsonify(status_data), 200 + return jsonify({ + "active_client": current_app.active_clients[client_id].to_dict(), + "status": status_data['status'] + }), 200 except TimeoutError: return jsonify({"error": f"Client {client_id} did not respond within the timeout period."}), 504