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
1d458db3
Commit
1d458db3
authored
Dec 27, 2023
by
Timothy J. Baek
Browse files
fix: print removed
parent
34eb90b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
8 deletions
+0
-8
backend/apps/web/models/auths.py
backend/apps/web/models/auths.py
+0
-8
No files found.
backend/apps/web/models/auths.py
View file @
1d458db3
...
@@ -86,11 +86,9 @@ class AuthsTable:
...
@@ -86,11 +86,9 @@ class AuthsTable:
**
{
"id"
:
id
,
"email"
:
email
,
"password"
:
password
,
"active"
:
True
}
**
{
"id"
:
id
,
"email"
:
email
,
"password"
:
password
,
"active"
:
True
}
)
)
result
=
Auth
.
create
(
**
auth
.
model_dump
())
result
=
Auth
.
create
(
**
auth
.
model_dump
())
print
(
result
)
user
=
Users
.
insert_new_user
(
id
,
name
,
email
,
role
)
user
=
Users
.
insert_new_user
(
id
,
name
,
email
,
role
)
print
(
result
,
user
)
if
result
and
user
:
if
result
and
user
:
return
user
return
user
else
:
else
:
...
@@ -100,15 +98,9 @@ class AuthsTable:
...
@@ -100,15 +98,9 @@ class AuthsTable:
print
(
"authenticate_user"
,
email
)
print
(
"authenticate_user"
,
email
)
try
:
try
:
auth
=
Auth
.
get
(
Auth
.
email
==
email
,
Auth
.
active
==
True
)
auth
=
Auth
.
get
(
Auth
.
email
==
email
,
Auth
.
active
==
True
)
print
(
auth
.
email
)
if
auth
:
if
auth
:
print
(
password
,
str
(
auth
.
password
))
print
(
verify_password
(
password
,
str
(
auth
.
password
)))
if
verify_password
(
password
,
auth
.
password
):
if
verify_password
(
password
,
auth
.
password
):
user
=
Users
.
get_user_by_id
(
auth
.
id
)
user
=
Users
.
get_user_by_id
(
auth
.
id
)
print
(
user
)
return
user
return
user
else
:
else
:
return
None
return
None
...
...
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