use axum::{Json, extract::State}; use crate::{dto::LibraryStatisticsResponse, error::ApiError, state::AppState}; pub async fn library_statistics( State(state): State, ) -> Result, ApiError> { let stats = state.storage.library_statistics().await?; Ok(Json(LibraryStatisticsResponse::from(stats))) }