use axum::extract::{Path, State}; use export::data::AppResponseData; use jwt::extractor::AuthUser; use uuid::Uuid; use crate::error::RepoResult; use crate::features::git_ref::CommitView; use crate::features::RepoService; #[utoipa::path( get, path = "/repo/{channel_id}/{repo_id}/git/commits/{sha}", tag = "repo", responses((status = 200, description = "Get a commit", body = AppResponseData)), 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_commit(claims.sub, repo_id, &sha).await?; Ok(AppResponseData::ok(view)) }