use axum::Json; use axum::extract::{Path, State}; use jwt::extractor::AuthUser; use uuid::Uuid; use crate::error::UserResult; use crate::features::UserService; use crate::features::profile::ProfileView; #[utoipa::path( get, path = "/user/users/{uid}/profile-detail", tag = "user", params( ("uid" = Uuid, Path, description = "User identifier."), ), responses( (status = 200, description = "Extended profile record.", body = ProfileView), (status = 404, description = "Profile not found."), ), )] pub(crate) async fn handler( State(svc): State, _user: AuthUser, Path(uid): Path, ) -> UserResult> { let view = svc.get_profile(uid).await?; Ok(Json(view)) }