Add settings and history archive repository protocols and DI support
This commit is contained in:
@@ -29,6 +29,8 @@ Reference: `Docs/Refactoring.md` for full analysis of each issue.
|
||||
|
||||
### 2. Missing Repository Protocols for `settings_repo` and `history_archive_repo`
|
||||
|
||||
**Status:** Completed.
|
||||
|
||||
**Where:** `backend/app/repositories/protocols.py` defines protocols for 5 of the 7 repositories. The two missing are `settings_repo.py` and `history_archive_repo.py`.
|
||||
|
||||
**Goal:** Define `SettingsRepository` and `HistoryArchiveRepository` protocols in `protocols.py` that match the public functions of `settings_repo` (`get_setting`, `set_setting`, `delete_setting`, `get_all_settings`) and `history_archive_repo` (`archive_ban_event`, `get_max_timeofban`, `get_archived_history`). Add corresponding dependency providers in `dependencies.py` and typed aliases so these repositories can be injected the same way as the other five.
|
||||
|
||||
Reference in New Issue
Block a user