mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 13:40:55 +00:00
fix: print removed
This commit is contained in:
parent
34eb90b09e
commit
1d458db316
@ -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:
|
|||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user