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 2da516f85a - Show all commits
+13 -4
View File
@@ -231,8 +231,10 @@ pub mod requests {
app: &axum::Router,
user_id: &uuid::Uuid,
) -> Result<axum::response::Response, axum::http::Error> {
let url = super::util::format_url_with_value(textsender_auth::callers::endpoints::GET_USER_PROFILE, user_id);
let url = super::util::format_url_with_value(
textsender_auth::callers::endpoints::GET_USER_PROFILE,
user_id,
);
match axum::http::Request::builder()
.method(axum::http::Method::GET)
.uri(url)
@@ -1061,11 +1063,18 @@ async fn test_get_user_profile() {
match requests::get_user_profile(&app, &user_id).await {
Ok(response) => {
match util::convert_response::<textsender_auth::callers::login::response::GetUserProfileResponse>(response).await {
match util::convert_response::<
textsender_auth::callers::login::response::GetUserProfileResponse,
>(response)
.await
{
Ok(response) => {
assert_eq!(false, response.data.is_empty(), "No User Profile found");
let user_profile = &response.data[0];
assert_eq!(TEST_USERNAME, user_profile.username, "Username does not match");
assert_eq!(
TEST_USERNAME, user_profile.username,
"Username does not match"
);
}
Err(err) => {
assert!(false, "Error: {err:?}");