사요자 대시보드 추가
This commit is contained in:
@@ -35,7 +35,7 @@ async def create_registration(data: dict[str, Any], password_hash: str) -> int:
|
||||
await cursor.execute(
|
||||
"""INSERT INTO users
|
||||
(email, password_hash, name, position, phone, role, is_master, status)
|
||||
VALUES (%s, %s, %s, %s, %s, 'MEMBER', FALSE, 'PENDING_EMAIL')""",
|
||||
VALUES (%s, %s, %s, %s, %s, 'USER', FALSE, 'PENDING_EMAIL')""",
|
||||
(
|
||||
data["email"],
|
||||
password_hash,
|
||||
@@ -152,7 +152,8 @@ async def complete_registration(user_id: int, is_master: bool) -> None:
|
||||
pool = get_db_pool()
|
||||
async with pool.acquire() as connection, connection.cursor() as cursor:
|
||||
await cursor.execute(
|
||||
"""UPDATE users SET status = 'NO_COMPANY', last_email_verified_at = CURRENT_TIMESTAMP
|
||||
"""UPDATE users SET status = 'NO_COMPANY', last_email_verified_at = CURRENT_TIMESTAMP,
|
||||
auth_expires_at = DATE_ADD(CURRENT_TIMESTAMP, INTERVAL 3 MONTH)
|
||||
WHERE id = %s""",
|
||||
(user_id,),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user