Refactor app helpers and use AppStateDep in config router

Move service-dependent helper wrappers from app.utils to app.helpers and update config router activation/rollback to use explicit AppState dependency.
This commit is contained in:
2026-04-07 20:39:56 +02:00
parent ed3aa61c35
commit 1e39e5a1d6
11 changed files with 98 additions and 30 deletions

View File

@@ -17,6 +17,12 @@ from pathlib import Path
import structlog
from app.exceptions import ConfigWriteError, JailNotFoundInConfigError
from app.helpers.config_file_helpers import (
_get_active_jail_names,
_parse_jails_sync,
)
from app.helpers.jail_helpers import reload_jails
from app.models.config import (
ActionConfig,
ActionConfigUpdate,
@@ -25,14 +31,7 @@ from app.models.config import (
ActionUpdateRequest,
AssignActionRequest,
)
from app.exceptions import JailNotFoundError
from app.utils.config_file_utils import (
_parse_jails_sync,
_get_active_jail_names,
)
from app.exceptions import ConfigWriteError, JailNotFoundInConfigError
from app.utils import conffile_parser
from app.utils.jail_utils import reload_jails
log: structlog.stdlib.BoundLogger = structlog.get_logger()