Skip to content
Clone

refactor(repo): refresh extras contents_ext handler

zhenyi committed
parent 16c770b commit 4ce8f40 Browse files

1 file changed

+7 −6

Modified lib/repo/handler/extras/contents_ext.rs View lib/repo/handler/extras/contents_ext.rs
@@ -1,11 +1,12 @@
1use axum::Json;
21use axum::extract::{Path, Query, State};
2use export::data::AppResponseData;
3
34use jwt::extractor::AuthUser;
45use uuid::Uuid;
56
67use crate::error::RepoResult;
78use crate::features::RepoService;
8use crate::features::contents::types::{ContentsExtResponse, ContentsQuery, ContentsResponse};
9use export::repo::contents::{ContentsExtResponse, ContentsQuery, ContentsResponse};
910
1011#[utoipa::path(
1112 get,
@@ -20,9 +21,9 @@
2021 AuthUser { claims }: AuthUser,
2122 Path((_, _repo_id)): Path<(Uuid, Uuid)>,
2223 Query(_q): Query<ContentsQuery>,
23) -> RepoResult<Json<ContentsExtResponse>> {
24) -> RepoResult<AppResponseData<ContentsExtResponse>> {
2425 let _ = claims;
25 Ok(Json(ContentsExtResponse {
26 Ok(AppResponseData::ok(ContentsExtResponse {
2627 file_contents: None,
2728 dir_contents: Vec::<ContentsResponse>::new(),
2829 }))
@@ -41,9 +42,9 @@
4142 AuthUser { claims }: AuthUser,
4243 Path((_, _repo_id, _path)): Path<(Uuid, Uuid, String)>,
4344 Query(_q): Query<ContentsQuery>,
44) -> RepoResult<Json<ContentsExtResponse>> {
45) -> RepoResult<AppResponseData<ContentsExtResponse>> {
4546 let _ = claims;
46 Ok(Json(ContentsExtResponse {
47 Ok(AppResponseData::ok(ContentsExtResponse {
4748 file_contents: None,
4849 dir_contents: Vec::<ContentsResponse>::new(),
4950 }))