Skip to content
Clone

refactor(user): refresh suspensions list_all handler

zhenyi committed
parent a533cfa commit 741af72 Browse files

1 file changed

+4 −4

Modified lib/user/handler/suspensions/list_all.rs View lib/user/handler/suspensions/list_all.rs
@@ -1,5 +1,5 @@
1use axum::Json;
21use axum::extract::{Query, State};
2use export::data::AppResponseData;
33use jwt::extractor::AuthAdmin;
44use serde::Deserialize;
55
@@ -21,7 +21,7 @@
2121 ("include_revoked" = Option<bool>, Query, description = "Include revoked suspensions (default false)."),
2222 ),
2323 responses(
24 (status = 200, description = "All suspensions (admin view).", body = Vec<SuspensionView>),
24 (status = 200, description = "All suspensions (admin view).", body = AppResponseData<Vec<SuspensionView>>),
2525 ),
2626 security(("bearer_auth" = [])),
2727)]
@@ -29,6 +29,6 @@
2929 State(svc): State<UserService>,
3030 _admin: AuthAdmin,
3131 Query(q): Query<ListAllQuery>,
32) -> UserResult<Json<Vec<SuspensionView>>> {
33 Ok(Json(svc.list_all_suspensions(q.include_revoked).await?))
32) -> UserResult<AppResponseData<Vec<SuspensionView>>> {
33 Ok(AppResponseData::ok(svc.list_all_suspensions(q.include_revoked).await?))
3434}
No newline at end of file