Update app.py
Browse files
app.py
CHANGED
@@ -302,8 +302,8 @@ def verify_password(plain_password, hashed_password):
|
|
302 |
def get_password_hash(password):
|
303 |
return pwd_context.hash(password)
|
304 |
|
305 |
-
def authenticate_user(db: Session,
|
306 |
-
user = db.query(User).filter(User.
|
307 |
if not user or not verify_password(password, user.hashed_password):
|
308 |
return False
|
309 |
return user
|
|
|
302 |
def get_password_hash(password):
|
303 |
return pwd_context.hash(password)
|
304 |
|
305 |
+
def authenticate_user(db: Session, email: str, password: str):
|
306 |
+
user = db.query(User).filter(User.email == username).first()
|
307 |
if not user or not verify_password(password, user.hashed_password):
|
308 |
return False
|
309 |
return user
|