use axum::Json; use axum::extract::{Path, State}; use jwt::extractor::AuthUser; use uuid::Uuid; use crate::error::RepoResult; use crate::features::RepoService; use crate::features::git_ref::NoteView; #[utoipa::path( get, path = "/repo/{channel_id}/{repo_id}/git/notes/{sha}", tag = "repo", responses((status = 200, description = "Get a note", body = NoteView)), security(("bearer_auth" = [])) )] pub(crate) async fn handler( State(svc): State, AuthUser { claims }: AuthUser, Path((_, repo_id, sha)): Path<(Uuid, Uuid, String)>, ) -> RepoResult> { let view = svc.get_note(claims.sub, repo_id, &sha).await?; Ok(Json(view)) }