Update auth.py
Browse files
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(
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|