refactor(repo): refresh extras fork handler
zhenyi committed
Modified lib/repo/handler/extras/fork.rs lib/repo/handler/extras/fork.rs +5 −4 View lib/repo/handler/extras/fork.rs
@@ -1,5 +1,6 @@
1use axum::Json;
21use axum::extract::{Path, Query, State};
2use export::data::AppResponseData;
3
34use jwt::extractor::AuthUser;
45use uuid::Uuid;
56
@@ -12,7 +13,7 @@
1213 path = "/repo/{channel_id}/{repo_id}/forks",
1314 tag = "repo",
1415 params(ForksQuery),
15 responses((status = 200, description = "List forks", body = ForksResponse)),
16 responses((status = 200, description = "List forks", body = AppResponseData<ForksResponse>)),
1617 security(("bearer_auth" = []))
1718)]
1819pub(crate) async fn list_handler(
@@ -20,7 +21,7 @@
2021 AuthUser { claims }: AuthUser,
2122 Path((_, repo_id)): Path<(Uuid, Uuid)>,
2223 Query(q): Query<ForksQuery>,
23) -> RepoResult<Json<ForksResponse>> {
24) -> RepoResult<AppResponseData<ForksResponse>> {
2425 let out = svc.list_forks(claims.sub, repo_id, q.page, q.limit).await?;
25 Ok(Json(out))
26 Ok(AppResponseData::ok(out))
2627}