사요자 대시보드 추가

This commit is contained in:
2026-07-08 18:12:34 +09:00
parent 5da0260be3
commit 3485eeb096
24 changed files with 3461 additions and 229 deletions
+3 -2
View File
@@ -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,),
)