Get User profile endpoint #18

Merged
phoenix merged 7 commits from user_profile-endpoint into main 2026-07-01 22:37:26 -04:00
Showing only changes of commit 8f0d3f4e6d - Show all commits
+5 -2
View File
@@ -836,7 +836,7 @@ pub async fn get_user_profile(
lastname: user.lastname,
last_login: user.last_login,
created: user.created,
username: user.username
username: user.username,
};
response.message = String::from(super::messages::SUCCESSFUL_MESSAGE);
response.data.push(user_profile);
@@ -846,7 +846,10 @@ pub async fn get_user_profile(
Err(err) => {
eprintln!("Error: {err:?}");
response.message = String::from("Bad request");
(axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::Json(response))
(
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::Json(response),
)
}
}
}