Gregniuki commited on
Commit
9034fa5
1 Parent(s): 8d3bed9

Update auth.py

Browse files
Files changed (1) hide show
  1. auth.py +1 -1
auth.py CHANGED
@@ -45,7 +45,7 @@ from emailx import send_verification_email, generate_verification_token
45
 
46
  def register(self, user: UserCreate, db: Session = Depends(get_db)):
47
  # Validate email format and check for existing users
48
- db_user = database.get_user_by_email(db, user.email)
49
  if db_user:
50
  raise HTTPException(status_code=400, detail="Email already registered")
51
 
 
45
 
46
  def register(self, user: UserCreate, db: Session = Depends(get_db)):
47
  # Validate email format and check for existing users
48
+ db_user = get_user_by_email(db, user.email)
49
  if db_user:
50
  raise HTTPException(status_code=400, detail="Email already registered")
51