Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
398b2076
Commit
398b2076
authored
Apr 02, 2024
by
Timothy J. Baek
Browse files
refac
parent
fb516ea6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
backend/utils/utils.py
backend/utils/utils.py
+2
-2
No files found.
backend/utils/utils.py
View file @
398b2076
from
fastapi.security
import
HTTPBearer
,
HTTPAuthorizationCredentials
from
fastapi
import
HTTPException
,
status
,
Depends
from
apps.web.models.users
import
Users
from
apps.web.models.auths
import
Auths
from
pydantic
import
BaseModel
from
typing
import
Union
,
Optional
...
...
@@ -97,8 +99,6 @@ def get_current_user(
def
get_current_user_by_api_key
(
api_key
:
str
):
from
apps.web.models.auths
import
Auths
user
=
Auths
.
authenticate_user_by_api_key
(
api_key
)
if
user
is
None
:
raise
HTTPException
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment