This commit is contained in:
Timothy Jaeryang Baek
2025-01-05 00:44:38 -08:00
parent 2444327a47
commit fe59b7f39c
4 changed files with 41 additions and 34 deletions

View File

@@ -464,13 +464,13 @@ async def clone_chat_by_id(id: str, user=Depends(get_verified_user)):
############################
# CloneChatByShareId
# CloneSharedChatById
############################
@router.post("/{share_id}/clone_shared", response_model=Optional[ChatResponse])
async def clone_chat_by_share_id(share_id: str, user=Depends(get_verified_user)):
chat = Chats.get_chat_by_share_id(share_id)
@router.post("/{id}/clone/shared", response_model=Optional[ChatResponse])
async def clone_shared_chat_by_id(id: str, user=Depends(get_verified_user)):
chat = Chats.get_chat_by_share_id(id)
if chat:
updated_chat = {
**chat.chat,
@@ -487,7 +487,6 @@ async def clone_chat_by_share_id(share_id: str, user=Depends(get_verified_user))
)
############################
# ArchiveChat
############################