Spaces:
Sleeping
Sleeping
Update api/routes.py
Browse files- api/routes.py +2 -1
api/routes.py
CHANGED
|
@@ -13,10 +13,11 @@ async def signup(data: SignupForm):
|
|
| 13 |
existing = await users_collection.find_one({"email": email})
|
| 14 |
if existing:
|
| 15 |
raise HTTPException(status_code=409, detail="Email already exists")
|
| 16 |
-
|
| 17 |
hashed_pw = hash_password(data.password)
|
| 18 |
user_doc = {
|
| 19 |
"email": email,
|
|
|
|
| 20 |
"password": hashed_pw,
|
| 21 |
"created_at": datetime.utcnow()
|
| 22 |
}
|
|
|
|
| 13 |
existing = await users_collection.find_one({"email": email})
|
| 14 |
if existing:
|
| 15 |
raise HTTPException(status_code=409, detail="Email already exists")
|
| 16 |
+
|
| 17 |
hashed_pw = hash_password(data.password)
|
| 18 |
user_doc = {
|
| 19 |
"email": email,
|
| 20 |
+
"full_name": data.full_name.strip(),
|
| 21 |
"password": hashed_pw,
|
| 22 |
"created_at": datetime.utcnow()
|
| 23 |
}
|