Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jwmke committed Mar 31, 2024
1 parent add2fd0 commit c24c4c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/api/v1/api.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,6 +22,7 @@
allow_headers=["*"], # Allow all headers
)


# https://stackoverflow.com/a/70626324
@app.websocket("/ws")
async def get_stream(websocket: WebSocket):
Expand All @@ -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"}
print(data)
return {"status": "success"}
24 changes: 0 additions & 24 deletions src/ui/v1/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,30 +147,6 @@ export default function Home() {
</div>
<div className="aspect-square"/>
</div>
{/* <button
className="arrow-button"
onClick={() => setDirection("up")}
>
Up
</button>
<button
className="arrow-button"
onClick={() => setDirection("down")}
>
Down
</button>
<button
className="arrow-button"
onClick={() => setDirection("left")}
>
Left
</button>
<button
className="arrow-button"
onClick={() => setDirection("right")}
>
Right
</button> */}
</div>
</div>
</div>
Expand Down

0 comments on commit c24c4c6

Please sign in to comment.