Task 13: move ban_ip, unban_ip, and get_active_bans from jail_service to ban_service and update routers/tests

This commit is contained in:
2026-04-17 16:22:20 +02:00
parent 6e1e3c4546
commit 8c6950afc1
9 changed files with 366 additions and 247 deletions

View File

@@ -44,7 +44,7 @@ from app.models.blocklist import (
ScheduleConfig,
ScheduleInfo,
)
from app.services import blocklist_service, geo_service, jail_service
from app.services import ban_service, blocklist_service, geo_service
from app.tasks.blocklist_import import run_import_with_resources
router: APIRouter = APIRouter(prefix="/api/blocklists", tags=["Blocklists"])
@@ -138,7 +138,7 @@ async def run_import_now(
socket_path,
geo_is_cached=geo_service.is_cached,
geo_batch_lookup=geo_batch_lookup,
ban_ip=jail_service.ban_ip,
ban_ip=ban_service.ban_ip,
)