Skip to content
Clone

refactor(user): refresh social list_blocks handler

zhenyi committed
parent 72b2d17 commit 447bae9 Browse files

1 file changed

+4 −4

Modified lib/user/handler/social/list_blocks.rs View lib/user/handler/social/list_blocks.rs
@@ -1,5 +1,5 @@
1use axum::Json;
21use axum::extract::{Query, State};
2use export::data::AppResponseData;
33use jwt::extractor::AuthUser;
44
55use crate::error::UserResult;
@@ -15,7 +15,7 @@
1515 ("cursor" = Option<uuid::Uuid>, Query, description = "Pagination cursor (id)."),
1616 ),
1717 responses(
18 (status = 200, description = "Page of blocked users.", body = Vec<BlockedSummary>),
18 (status = 200, description = "Page of blocked users.", body = AppResponseData<Vec<BlockedSummary>>),
1919 ),
2020 security(("bearer_auth" = [])),
2121)]
@@ -23,7 +23,7 @@
2323 State(svc): State<UserService>,
2424 AuthUser { claims }: AuthUser,
2525 Query(params): Query<ListBlocksQuery>,
26) -> UserResult<Json<Vec<BlockedSummary>>> {
26) -> UserResult<AppResponseData<Vec<BlockedSummary>>> {
2727 let rows = svc.list_blocks(claims.sub, params).await?;
28 Ok(Json(rows))
28 Ok(AppResponseData::ok(rows))
2929}
No newline at end of file