Remove repository import from setup_utils and move password-hash helper to setup service
This commit is contained in:
@@ -22,9 +22,6 @@ from app.services.settings_service import (
|
||||
set_map_color_thresholds as util_set_map_color_thresholds,
|
||||
)
|
||||
from app.utils.async_utils import run_blocking
|
||||
from app.utils.setup_utils import (
|
||||
get_password_hash as util_get_password_hash,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import aiosqlite
|
||||
@@ -131,7 +128,7 @@ async def run_setup(
|
||||
|
||||
async def get_password_hash(db: aiosqlite.Connection) -> str | None:
|
||||
"""Return the stored bcrypt password hash, or ``None`` if not set."""
|
||||
return await util_get_password_hash(db)
|
||||
return await settings_repo.get_setting(db, _KEY_PASSWORD_HASH)
|
||||
|
||||
|
||||
async def get_runtime_database_path(db: aiosqlite.Connection) -> str | None:
|
||||
|
||||
Reference in New Issue
Block a user