This commit is contained in:
2023-11-04 17:17:08 +09:00
5 changed files with 7 additions and 5 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,
),