a06673b
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::topic::TopicList;
#[utoipa::path(
get,
path = "/repo/{channel_id}/{repo_id}/topics",
tag = "repo",
responses((status = 200, description = "List repo topics", body = TopicList)),
security(("bearer_auth" = []))
)]
pub(crate) async fn handler(
State(svc): State<RepoService>,
AuthUser { claims }: AuthUser,
Path((_, repo_id)): Path<(Uuid, Uuid)>,
) -> RepoResult<Json<TopicList>> {
let list = svc.list_repo_topics(claims.sub, repo_id).await?;
Ok(Json(list))
}