Skip to content

Commit

Permalink
fix: chat api
Browse files Browse the repository at this point in the history
  • Loading branch information
okradze committed Jan 27, 2024
1 parent c6f713e commit 5254cf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/server/controllers/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

@router.post("", status_code=201, include_in_schema=False)
def create_chat(
chat: ChatInput, auth: UserAccount = Depends(authenticate_by_token_or_api_key)
chat: ChatInput, auth: UserAccount = Depends(authenticate_by_any)
) -> ChatOutput:
if not chat.agent_id and not chat.team_id:
ChatException("Agent or Team should be defined")
Expand All @@ -44,7 +44,7 @@ def create_chat(


@router.post("/widget", status_code=201, include_in_schema=False)
def create_chat(chat: ChatInput) -> ChatOutput:
def create_chat_from_widget(chat: ChatInput) -> ChatOutput:
if not chat.agent_id and not chat.team_id:
raise ChatException("Agent or Team should be defined")

Expand Down

0 comments on commit 5254cf8

Please sign in to comment.