Split monolithic config router into focused subrouters

This commit is contained in:
2026-04-12 19:41:43 +02:00
parent e271207795
commit e221cd414f
6 changed files with 1766 additions and 1649 deletions

View File

@@ -107,6 +107,7 @@ Reference: `Docs/Refactoring.md` for full analysis of each issue.
- Issue: `app/routers/config.py` and `app/routers/file_config.py` each contain many unrelated endpoints with mixed concerns, making the HTTP layer large, hard to navigate, and harder to evolve safely.
- Propose: Refactor configuration endpoints into smaller routers or feature-specific modules such as `jail_config`, `filter_config`, `action_config`, and `raw_config`. Keep each router focused on one vertical slice of functionality and delegate business logic to a single service.
- Test: Verify the refactor preserves endpoint behavior and that router tests are split along the new modules, ensuring each HTTP layer unit test covers a narrow, well-defined feature.
- Status: completed
15. Centralize fail2ban metadata resolution and avoid repeated socket discovery
- Goal: Reduce coupling between history APIs and fail2ban socket metadata discovery, improving performance and reliability.