From a204bb167670982923d3b62254325e8a2c133dff Mon Sep 17 00:00:00 2001 From: hasslesstech Date: Tue, 24 Mar 2026 16:38:16 +0200 Subject: [PATCH] [P] Split rows into websocket-sendable messages --- store/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/store/main.py b/store/main.py index 41c0785..e230c50 100644 --- a/store/main.py +++ b/store/main.py @@ -55,7 +55,8 @@ async def websocket_endpoint(websocket: WebSocket, user_id: int): for i in jsonable_data: i['timestamp'] = i['timestamp'].strftime("%Y-%m-%dT%H:%M:%SZ") - await websocket.send_json(json.dumps(jsonable_data)) + for i in jsonable_data: + await websocket.send_json(json.dumps([i])) # receive forever while True: