fix: unit tests fixes and ruff formating
N25B-205
This commit is contained in:
@@ -9,6 +9,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post("/command", status_code=202)
|
||||
async def receive_command(command: SpeechCommand, request: Request):
|
||||
# Validate and retrieve data.
|
||||
@@ -16,5 +17,6 @@ async def receive_command(command: SpeechCommand, request: Request):
|
||||
topic = b"command"
|
||||
pub_socket: Socket = request.app.state.internal_comm_socket
|
||||
pub_socket.send_multipart([topic, command.model_dump_json().encode()])
|
||||
|
||||
|
||||
return {"status": "Command received"}
|
||||
|
||||
@@ -6,12 +6,6 @@ api_router = APIRouter()
|
||||
|
||||
api_router.include_router(message.router, tags=["Messages"])
|
||||
|
||||
api_router.include_router(
|
||||
sse.router,
|
||||
tags=["SSE"]
|
||||
)
|
||||
api_router.include_router(sse.router, tags=["SSE"])
|
||||
|
||||
api_router.include_router(
|
||||
command.router,
|
||||
tags=["Commands"]
|
||||
)
|
||||
api_router.include_router(command.router, tags=["Commands"])
|
||||
|
||||
Reference in New Issue
Block a user