Add more logging

This commit is contained in:
Esa Kataja
2025-05-10 15:17:57 +03:00
parent 40010c9860
commit c2884ac9ce
+4
View File
@@ -6,6 +6,7 @@ from dotenv import load_dotenv
import os import os
from lib.helpers import hash_password from lib.helpers import hash_password
from lib.logger import logger
load_dotenv() load_dotenv()
@@ -61,6 +62,9 @@ def seed_db() -> None:
# Seed Admin users # Seed Admin users
admin_username = os.getenv("ADMIN_USERNAME") admin_username = os.getenv("ADMIN_USERNAME")
hashed_admin_password = hash_password(os.getenv("ADMIN_PASSWORD", "password")) hashed_admin_password = hash_password(os.getenv("ADMIN_PASSWORD", "password"))
logger.debug(
f"Admin user: {admin_username}, hashed password: {hashed_admin_password}"
)
with get_connection() as conn: with get_connection() as conn:
conn.execute( conn.execute(
'INSERT INTO "User" (username, hashed_password, team_id, is_active, is_admin) VALUES (?, ?, ?, ?, ?)', 'INSERT INTO "User" (username, hashed_password, team_id, is_active, is_admin) VALUES (?, ?, ?, ?, ?)',