feat: wire real wrapup adapters into presentation + worker

This commit is contained in:
2026-06-02 22:19:29 +02:00
parent 5a15bea3d4
commit ea43911984
4 changed files with 16 additions and 4 deletions

View File

@@ -31,6 +31,8 @@ pub struct DatabaseOutput {
pub search_command: Arc<dyn domain::ports::SearchCommand>,
pub profile_fields: Arc<dyn UserProfileFieldsRepository>,
pub ap_content: Arc<dyn LocalApContentQuery>,
pub wrapup_stats: Arc<dyn domain::ports::WrapUpStatsQuery>,
pub wrapup_repo: Arc<dyn domain::ports::WrapUpRepository>,
pub db_pool: DbPool,
}
@@ -67,6 +69,8 @@ pub async fn build_database_adapters(backend: &str, url: &str) -> anyhow::Result
search_command: sc,
profile_fields: pf,
ap_content: w.ap_content,
wrapup_stats: w.wrapup_stats,
wrapup_repo: w.wrapup_repo,
db_pool: DbPool::Postgres(w.pool),
})
}
@@ -100,6 +104,8 @@ pub async fn build_database_adapters(backend: &str, url: &str) -> anyhow::Result
search_command: sc,
profile_fields: pf,
ap_content: w.ap_content,
wrapup_stats: w.wrapup_stats,
wrapup_repo: w.wrapup_repo,
db_pool: DbPool::Sqlite(w.pool),
})
}

View File

@@ -193,8 +193,8 @@ async fn wire_dependencies() -> anyhow::Result<(AppState, axum::Router)> {
social_query: social_query.clone(),
#[cfg(not(feature = "federation"))]
social_query: Arc::new(domain::testing::NoopSocialQueryPort),
wrapup_stats: Arc::new(domain::testing::PanicWrapUpStatsQuery) as Arc<dyn domain::ports::WrapUpStatsQuery>,
wrapup_repo: Arc::new(domain::testing::PanicWrapUpRepository) as Arc<dyn domain::ports::WrapUpRepository>,
wrapup_stats: db.wrapup_stats,
wrapup_repo: db.wrapup_repo,
},
services: Services {
auth: auth_service,

View File

@@ -36,6 +36,8 @@ pub struct WorkerDbOutput {
pub ap_content: Arc<dyn LocalApContentQuery>,
pub image_ref_command: Arc<dyn ImageRefCommand>,
pub image_ref_query: Arc<dyn ImageRefQuery>,
pub wrapup_stats: Arc<dyn domain::ports::WrapUpStatsQuery>,
pub wrapup_repo: Arc<dyn domain::ports::WrapUpRepository>,
pub db_pool: DbPool,
}
@@ -76,6 +78,8 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
ap_content: w.ap_content,
image_ref_command,
image_ref_query,
wrapup_stats: w.wrapup_stats,
wrapup_repo: w.wrapup_repo,
db_pool: DbPool::Postgres(w.pool),
})
}
@@ -113,6 +117,8 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
ap_content: w.ap_content,
image_ref_command,
image_ref_query,
wrapup_stats: w.wrapup_stats,
wrapup_repo: w.wrapup_repo,
db_pool: DbPool::Sqlite(w.pool),
})
}

View File

@@ -92,8 +92,8 @@ async fn main() -> anyhow::Result<()> {
social_query: fed_social_query,
#[cfg(not(feature = "federation"))]
social_query: Arc::new(domain::testing::NoopSocialQueryPort),
wrapup_stats: Arc::new(domain::testing::PanicWrapUpStatsQuery) as Arc<dyn domain::ports::WrapUpStatsQuery>,
wrapup_repo: Arc::new(domain::testing::PanicWrapUpRepository) as Arc<dyn domain::ports::WrapUpRepository>,
wrapup_stats: db.wrapup_stats,
wrapup_repo: db.wrapup_repo,
},
services: Services {
auth: auth_service,