diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 5b95294..6c6c56b 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1,6 +1,6 @@ { "lockFileVersion": 6, - "moduleFileHash": "9116b2d8fb0ce39849813bdeb4be5ffcf1ad8eabf88914f56b198ba6b8ec515d", + "moduleFileHash": "4fa47c1d36ebfbfef45d2813f94b4ba9f3e8ebfef3d74978a732860e3c6b9f37", "flags": { "cmdRegistries": [ "https://bcr.bazel.build/" diff --git a/src/api/v1/api.py b/src/api/v1/api.py index a216151..ce7e322 100644 --- a/src/api/v1/api.py +++ b/src/api/v1/api.py @@ -1,5 +1,4 @@ from typing import Union -import json from fastapi import FastAPI, Request, WebSocket, WebSocketDisconnect from websockets.exceptions import ConnectionClosed from fastapi.templating import Jinja2Templates @@ -23,6 +22,7 @@ allow_headers=["*"], # Allow all headers ) + # https://stackoverflow.com/a/70626324 @app.websocket("/ws") async def get_stream(websocket: WebSocket): @@ -39,8 +39,9 @@ async def get_stream(websocket: WebSocket): except (WebSocketDisconnect, ConnectionClosed): print("Client disconnected") + @app.post("/command") async def command(request: Request): data = await request.json() - data_dict = json.loads(data) - return {"status": "success"} \ No newline at end of file + print(data) + return {"status": "success"} diff --git a/src/ui/v1/src/app/page.tsx b/src/ui/v1/src/app/page.tsx index f0711fa..0513516 100644 --- a/src/ui/v1/src/app/page.tsx +++ b/src/ui/v1/src/app/page.tsx @@ -147,30 +147,6 @@ export default function Home() {
- {/* - - - */}