use axum::extract::{Path, State}; use export::data::AppResponseData; use jwt::extractor::AuthUser; use uuid::Uuid; use crate::error::IssueResult; use crate::features::IssueService; use crate::features::comment::CommentView; #[utoipa::path( get, path = "/issues/{space_name}/{issue_id}/comments/{comment_id}", tag = "issues", responses((status = 200, description = "Get comment", body = AppResponseData)), security(("bearer_auth" = [])) )] pub(crate) async fn handler( State(svc): State, AuthUser { claims }: AuthUser, Path((space_name, issue_id, comment_id)): Path<(String, Uuid, Uuid)>, ) -> IssueResult> { let space_id = space::features::lookup::lookup_space_by_name(&svc, &space_name).await?; space::features::authz::require_active_member(&svc, claims.sub, space_id).await?; let channel_id = crate::features::lookup::channel_for_issue(&svc, issue_id).await?; let view = svc .get_comment(claims.sub, channel_id, issue_id, comment_id) .await?; Ok(AppResponseData::ok(view)) }