This commit is contained in:
Timothy Jaeryang Baek
2026-02-21 15:35:34 -06:00
parent c114fd6876
commit 631e30e22d
26 changed files with 177 additions and 164 deletions
+4 -2
View File
@@ -1764,7 +1764,10 @@ async def chat_completion(
# Verify chat ownership — lightweight EXISTS check avoids
# deserializing the full chat JSON blob just to confirm the row exists
if not Chats.is_chat_owner(metadata["chat_id"], user.id) and user.role != "admin": # admins can access any chat
if (
not Chats.is_chat_owner(metadata["chat_id"], user.id)
and user.role != "admin"
): # admins can access any chat
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=ERROR_MESSAGES.DEFAULT(),
@@ -1972,7 +1975,6 @@ async def generate_messages(
return response
@app.post("/api/chat/completed")
async def chat_completed(
request: Request, form_data: dict, user=Depends(get_verified_user)