🎨 style(chat.py): add status code 201 to init_build endpoint
The init_build endpoint now returns a status code of 201 to indicate that a new resource has been created. This improves the consistency of the API and makes it easier for clients to understand the response.
This commit is contained in:
parent
af8afea421
commit
044b01e6ad
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ async def chat(client_id: str, websocket: WebSocket):
|
|||
await websocket.close(code=status.WS_1011_INTERNAL_ERROR, reason=str(exc))
|
||||
|
||||
|
||||
@router.post("/build/init", response_model=InitResponse)
|
||||
@router.post("/build/init", response_model=InitResponse, status_code=201)
|
||||
async def init_build(graph_data: dict):
|
||||
"""Initialize the build by storing graph data and returning a unique session ID."""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue