Gregniuki commited on
Commit
9768922
1 Parent(s): 14781cf

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -265,7 +265,7 @@ async def reset_password_get(request: Request, token: str):
265
 
266
  @app.post("/password-reset-request")
267
  async def password_reset_request(email: str = Form(...), db: Session = Depends(get_db)):
268
- user = db.query(User).filter(User.email == email).first()
269
 
270
 
271
  if not user:
 
265
 
266
  @app.post("/password-reset-request")
267
  async def password_reset_request(email: str = Form(...), db: Session = Depends(get_db)):
268
+ user = get_user_by_email(db, email)
269
 
270
 
271
  if not user: