mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
chore: formatting
This commit is contained in:
@@ -95,6 +95,7 @@ def get_current_user(
|
||||
detail=ERROR_MESSAGES.UNAUTHORIZED,
|
||||
)
|
||||
|
||||
|
||||
def get_current_user_by_api_key(api_key: str):
|
||||
from apps.web.models.auths import Auths
|
||||
|
||||
@@ -106,6 +107,7 @@ def get_current_user_by_api_key(api_key: str):
|
||||
)
|
||||
return user
|
||||
|
||||
|
||||
def get_verified_user(user=Depends(get_current_user)):
|
||||
if user.role not in {"user", "admin"}:
|
||||
raise HTTPException(
|
||||
|
||||
Reference in New Issue
Block a user