Skip to content
Clone

refactor(user): refresh social list_following handler

zhenyi committed
parent 476a2ef commit 58ada94 Browse files

1 file changed

+4 −4

Modified lib/user/handler/social/list_following.rs View lib/user/handler/social/list_following.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 accounts the user follows.", body = Vec<FollowerSummary>),
20 (status = 200, description = "Page of accounts the user follows.", body = AppResponseData<Vec<FollowerSummary>>),
2121 ),
2222)]
2323pub(crate) async fn handler(
@@ -25,12 +25,12 @@
2525 _opt: AuthOptional,
2626 Path(user_uid): Path<Uuid>,
2727 Query(params): Query<ListFollowingQuery>,
28) -> UserResult<Json<Vec<FollowerSummary>>> {
28) -> UserResult<AppResponseData<Vec<FollowerSummary>>> {
2929 let q = ListFollowingQuery {
3030 user_uid,
3131 limit: params.limit,
3232 cursor: params.cursor,
3333 };
3434 let rows = svc.list_following(q).await?;
35 Ok(Json(rows))
35 Ok(AppResponseData::ok(rows))
3636}
No newline at end of file