mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-12 23:02:35 +00:00
fix: move upload_and_replace route decorator to the actual handler
The previous rollback-helper extraction landed the decorator above
_rollback_new_file instead of upload_and_replace_file, which left the
POST /{id}/file/upload_and_replace route pointed at an internal helper
with the wrong signature (no id path param, no UploadFile, no
old_file_id form) and the real handler unexposed. Move the decorator
back to upload_and_replace_file and keep _rollback_new_file as a plain
private helper.
This commit is contained in:
parent
58e86b7b60
commit
624b360eb1
1 changed files with 1 additions and 1 deletions
|
|
@ -701,7 +701,6 @@ class UploadAndReplaceResponse(BaseModel):
|
|||
filename: str
|
||||
|
||||
|
||||
@router.post('/{id}/file/upload_and_replace', response_model=UploadAndReplaceResponse)
|
||||
async def _rollback_new_file(
|
||||
kb_id: str,
|
||||
new_file_id: str,
|
||||
|
|
@ -727,6 +726,7 @@ async def _rollback_new_file(
|
|||
)
|
||||
|
||||
|
||||
@router.post('/{id}/file/upload_and_replace', response_model=UploadAndReplaceResponse)
|
||||
async def upload_and_replace_file(
|
||||
request: Request,
|
||||
id: str,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue