first&last name

This commit is contained in:
2023-11-04 17:13:44 +09:00
parent 617b060869
commit 2538e4526f
5 changed files with 7 additions and 4 deletions

View File

@@ -58,7 +58,7 @@ def authenticate_user(db, email: str, password: str):
return user
def sign_up_new_user(db, email: str, password: str):
def sign_up_new_user(db, email: str, password: str, firstname: str,lastname: str):
user = get_user_by_email(db, email)
if user:
return False # User already exists
@@ -67,6 +67,8 @@ def sign_up_new_user(db, email: str, password: str):
schemas.UserCreate(
email=email,
password=password,
firstname = firstname,
lastname = lastname,
is_active=True,
is_superuser=False,
),