use axum::Json; use axum::extract::{Path, State}; use jwt::extractor::AuthUser; use uuid::Uuid; use crate::error::IssueResult; use crate::features::IssueService; use crate::features::label::LabelView; #[utoipa::path( get, path = "/issues/{channel_id}/labels/{label_id}", tag = "issues", responses((status = 200, description = "Get label", body = LabelView)), security(("bearer_auth" = [])) )] pub(crate) async fn handler( State(svc): State, AuthUser { claims }: AuthUser, Path((channel_id, label_id)): Path<(Uuid, Uuid)>, ) -> IssueResult> { let view = svc.get_label(claims.sub, channel_id, label_id).await?; Ok(Json(view)) }