Gregniuki commited on
Commit
f73c46a
1 Parent(s): 6de2582

Update auth.py

Browse files
Files changed (1) hide show
  1. auth.py +7 -1
auth.py CHANGED
@@ -108,7 +108,13 @@ def register(user: UserCreate, db: Session):
108
 
109
  # Create the user in the database
110
  # Set the email_verification_token field in the User model
111
- user_in_db = User(email=user.email, hashed_password=hashed_password, email_verification_token=verification_token)
 
 
 
 
 
 
112
 
113
  db.add(user_in_db)
114
  db.commit()
 
108
 
109
  # Create the user in the database
110
  # Set the email_verification_token field in the User model
111
+ user_in_db = User(
112
+ email=user.email,
113
+ username=user.username, # Set the username here
114
+ hashed_password=hashed_password,
115
+ email_verification_token=verification_token
116
+ )
117
+
118
 
119
  db.add(user_in_db)
120
  db.commit()