handlers: image/reindex/auth via use cases; auth::authenticate replaces ensure_active; check-handler-services guard
All checks were successful
CI / Check / Test (push) Successful in 1h10m22s

This commit is contained in:
2026-10-26 10:51:32 +01:00
parent 017b58d6fa
commit 00395357ac
30 changed files with 275 additions and 96 deletions

View File

@@ -163,8 +163,9 @@ pub async fn post_reindex_search(
State(state): State<AppState>,
_admin: crate::extractors::AdminApiUser,
) -> impl IntoResponse {
let event = domain::events::DomainEvent::SearchReindexRequested;
match state.app_ctx.services.event_publisher.publish(&event).await {
match application::search::request_reindex::execute(&state.app_ctx.deps.search.request_reindex)
.await
{
Ok(()) => StatusCode::ACCEPTED.into_response(),
Err(e) => {
tracing::error!("failed to publish reindex event: {:?}", e);