Skip to content
Clone

refactor(user): refresh social list_followers handler

zhenyi committed
parent 447bae9 commit 476a2ef Browse files

1 file changed

+4 −4

Modified lib/user/handler/social/list_followers.rs View lib/user/handler/social/list_followers.rs
@@ -1,5 +1,5 @@
1use axum::Json;
21use axum::extract::{Path, Query, State};
2use export::data::AppResponseData;
33use jwt::extractor::AuthOptional;
44use uuid::Uuid;
55
@@ -17,7 +17,7 @@
1717 ("cursor" = Option<Uuid>, Query, description = "Pagination cursor (id)."),
1818 ),
1919 responses(
20 (status = 200, description = "Page of followers.", body = Vec<FollowerSummary>),
20 (status = 200, description = "Page of followers.", body = AppResponseData<Vec<FollowerSummary>>),
2121 ),
2222)]
2323pub(crate) async fn handler(
@@ -25,12 +25,12 @@
2525 _opt: AuthOptional,
2626 Path(target_uid): Path<Uuid>,
2727 Query(params): Query<ListFollowersQuery>,
28) -> UserResult<Json<Vec<FollowerSummary>>> {
28) -> UserResult<AppResponseData<Vec<FollowerSummary>>> {
2929 let q = ListFollowersQuery {
3030 target_uid,
3131 limit: params.limit,
3232 cursor: params.cursor,
3333 };
3434 let rows = svc.list_followers(q).await?;
35 Ok(Json(rows))
35 Ok(AppResponseData::ok(rows))
3636}
No newline at end of file