Refactor application context and repository structure

- Updated `AppContext` to include separate repositories for movies, reviews, diaries, and stats.
- Modified use cases to utilize the new repository structure, ensuring that the correct repositories are called for their respective operations.
- Introduced `DiaryRepository` and `StatsRepository` traits to encapsulate diary and statistics-related operations.
- Updated all relevant use cases, handlers, and tests to reflect the changes in repository usage.
- Ensured that panic repositories are updated to implement the new traits for testing purposes.
This commit is contained in:
2026-05-09 18:58:29 +02:00
parent 5df26b69a0
commit 642d7ef3d0
19 changed files with 260 additions and 311 deletions

View File

@@ -9,5 +9,5 @@ pub async fn execute(
query: GetActivityFeedQuery,
) -> Result<Paginated<FeedEntry>, DomainError> {
let page = PageParams::new(query.limit, query.offset)?;
ctx.repository.query_activity_feed(&page).await
ctx.diary_repository.query_activity_feed(&page).await
}