mirror of
https://github.com/open-webui/open-webui
synced 2025-06-10 00:17:52 +00:00
refac
This commit is contained in:
parent
ef2aeb7c0e
commit
41904f21e4
@ -453,11 +453,10 @@ async def get_html_file_content_by_id(id: str, user=Depends(get_verified_user)):
|
|||||||
|
|
||||||
file_user = Users.get_user_by_id(file.user_id)
|
file_user = Users.get_user_by_id(file.user_id)
|
||||||
if not file_user.role == "admin":
|
if not file_user.role == "admin":
|
||||||
if not file_user:
|
raise HTTPException(
|
||||||
raise HTTPException(
|
status_code=status.HTTP_404_NOT_FOUND,
|
||||||
status_code=status.HTTP_404_NOT_FOUND,
|
detail=ERROR_MESSAGES.NOT_FOUND,
|
||||||
detail=ERROR_MESSAGES.NOT_FOUND,
|
)
|
||||||
)
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
file.user_id == user.id
|
file.user_id == user.id
|
||||||
|
Loading…
Reference in New Issue
Block a user