mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 03:47:49 +01:00
refac
This commit is contained in:
@@ -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
|
||||
############################
|
||||
|
||||
Reference in New Issue
Block a user