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
320e6585
Commit
320e6585
authored
Jun 24, 2024
by
Jonathan Rohde
Browse files
feat(sqlalchemy): cleanup fixes
parent
070d9083
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
backend/apps/socket/main.py
backend/apps/socket/main.py
+1
-3
backend/main.py
backend/main.py
+0
-1
No files found.
backend/apps/socket/main.py
View file @
320e6585
...
...
@@ -24,9 +24,7 @@ async def connect(sid, environ, auth):
data
=
decode_token
(
auth
[
"token"
])
if
data
is
not
None
and
"id"
in
data
:
from
apps.webui.internal.db
import
SessionLocal
user
=
Users
.
get_user_by_id
(
SessionLocal
(),
data
[
"id"
])
user
=
Users
.
get_user_by_id
(
data
[
"id"
])
if
user
:
SESSION_POOL
[
sid
]
=
user
.
id
...
...
backend/main.py
View file @
320e6585
...
...
@@ -751,7 +751,6 @@ class PipelineMiddleware(BaseHTTPMiddleware):
user
=
get_current_user
(
request
,
get_http_authorization_cred
(
request
.
headers
.
get
(
"Authorization"
)),
SessionLocal
(),
)
try
:
...
...
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