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::contents::DeleteFileOption; #[utoipa::path( delete, path = "/repo/{channel_id}/{repo_id}/contents/{path}", tag = "repo", request_body = DeleteFileOption, responses((status = 204, description = "Delete a file")), security(("bearer_auth" = [])) )] pub(crate) async fn handler( State(svc): State, AuthUser { claims }: AuthUser, Path((_, repo_id, path)): Path<(Uuid, Uuid, String)>, Json(input): Json, ) -> RepoResult { svc.delete_file(claims.sub, repo_id, &path, input).await?; Ok(StatusCode::NO_CONTENT) }