From 044b01e6ad627c3aa184127fd35b70b16e15f6a3 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 13 Jun 2023 20:23:44 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20style(chat.py):=20add=20status?= =?UTF-8?q?=20code=20201=20to=20init=5Fbuild=20endpoint=20The=20init=5Fbui?= =?UTF-8?q?ld=20endpoint=20now=20returns=20a=20status=20code=20of=20201=20?= =?UTF-8?q?to=20indicate=20that=20a=20new=20resource=20has=20been=20create?= =?UTF-8?q?d.=20This=20improves=20the=20consistency=20of=20the=20API=20and?= =?UTF-8?q?=20makes=20it=20easier=20for=20clients=20to=20understand=20the?= =?UTF-8?q?=20response.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/api/v1/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/api/v1/chat.py b/src/backend/langflow/api/v1/chat.py index 52c8e9a67..5a524c0b9 100644 --- a/src/backend/langflow/api/v1/chat.py +++ b/src/backend/langflow/api/v1/chat.py @@ -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."""