Skip to content
Clone

refactor(user): refresh profile profile_view handler

zhenyi committed
parent 6d47801 commit 6e3ae46 Browse files

1 file changed

+4 −4

Modified lib/user/handler/profile/profile_view.rs View lib/user/handler/profile/profile_view.rs
@@ -1,5 +1,5 @@
1use axum::Json;
21use axum::extract::{Path, State};
2use export::data::AppResponseData;
33use jwt::extractor::AuthUser;
44use uuid::Uuid;
55
@@ -16,7 +16,7 @@
1616 ("uid" = Uuid, Path, description = "User identifier."),
1717 ),
1818 responses(
19 (status = 200, description = "Extended profile record.", body = ProfileView),
19 (status = 200, description = "Extended profile record.", body = AppResponseData<ProfileView>),
2020 (status = 404, description = "Profile not found."),
2121 ),
2222)]
@@ -24,7 +24,7 @@
2424 State(svc): State<UserService>,
2525 _user: AuthUser,
2626 Path(uid): Path<Uuid>,
27) -> UserResult<Json<ProfileView>> {
27) -> UserResult<AppResponseData<ProfileView>> {
2828 let view = svc.get_profile(uid).await?;
29 Ok(Json(view))
29 Ok(AppResponseData::ok(view))
3030}
No newline at end of file