use axum::Json; use axum::extract::{Path, State}; use axum::http::StatusCode; use jwt::extractor::AuthUser; use uuid::Uuid; use crate::error::RepoResult; use crate::features::RepoService; use crate::features::topic::RepoTopicOptions; #[utoipa::path( put, path = "/repo/{channel_id}/{repo_id}/topics", tag = "repo", request_body = RepoTopicOptions, responses((status = 204, description = "Replace repo topics")), security(("bearer_auth" = [])) )] pub(crate) async fn handler( State(svc): State, AuthUser { claims }: AuthUser, Path((_, repo_id)): Path<(Uuid, Uuid)>, Json(input): Json, ) -> RepoResult { svc.update_repo_topics(claims.sub, repo_id, input).await?; Ok(StatusCode::NO_CONTENT) }