run npm run lint:backend

This commit is contained in:
Danny Liu 2024-04-04 01:10:51 -07:00
parent 8d1db9a1c0
commit 3b06096c52
3 changed files with 17 additions and 3 deletions

View file

@ -91,7 +91,12 @@ class AuthsTable:
self.db.create_tables([Auth])
def insert_new_auth(
self, email: str, password: str, name: str, profile_image_url: str, role: str = "pending"
self,
email: str,
password: str,
name: str,
profile_image_url: str,
role: str = "pending",
) -> Optional[UserModel]:
log.info("insert_new_auth")

View file

@ -57,7 +57,12 @@ class UsersTable:
self.db.create_tables([User])
def insert_new_user(
self, id: str, name: str, email: str, profile_image_url: str, role: str = "pending",
self,
id: str,
name: str,
email: str,
profile_image_url: str,
role: str = "pending",
) -> Optional[UserModel]:
user = UserModel(
**{

View file

@ -146,7 +146,11 @@ async def signup(request: Request, form_data: SignupForm):
)
hashed = get_password_hash(form_data.password)
user = Auths.insert_new_auth(
form_data.email.lower(), hashed, form_data.name, form_data.profile_image_url, role
form_data.email.lower(),
hashed,
form_data.name,
form_data.profile_image_url,
role,
)
if user: