use crate::AppState; use crate::extractors::AuthUser; use api_types::ClientDto; use axum::extract::State; use axum::response::Json; use domain::{ClientRegistry, ConfigRepository, EventPublisher}; type S = State>; pub async fn list_clients( _auth: AuthUser, State(state): S, ) -> Json> where C: ConfigRepository, C::Error: std::fmt::Debug, E: EventPublisher, E::Error: std::fmt::Debug, R: ClientRegistry, { Json( state .clients .list_clients() .iter() .map(ClientDto::from) .collect(), ) }