mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
Rename field to include_content
This commit is contained in:
parent
6d5cb6b04e
commit
138e985d66
1 changed files with 2 additions and 2 deletions
|
|
@ -162,13 +162,13 @@ def upload_file(
|
|||
|
||||
|
||||
@router.get("/", response_model=list[FileModelResponse])
|
||||
async def list_files(user=Depends(get_verified_user), content: bool = Query(True)):
|
||||
async def list_files(user=Depends(get_verified_user), include_content: bool = Query(True)):
|
||||
if user.role == "admin":
|
||||
files = Files.get_files()
|
||||
else:
|
||||
files = Files.get_files_by_user_id(user.id)
|
||||
|
||||
if not content:
|
||||
if not include_content:
|
||||
for file in files:
|
||||
file.data['content'] = ""
|
||||
return files
|
||||
|
|
|
|||
Loading…
Reference in a new issue