Compare commits

..
1 Commits
Author SHA1 Message Date
phoenix e82a62dec4 tsk-14: Update user profile (#15)
Release Tagging / release (push) Successful in 16s
soaricarus_auth Build / build (push) Successful in 1m5s
soaricarus_auth Build / Rustfmt (push) Successful in 1m10s
soaricarus_auth Build / Check (push) Successful in 1m16s
soaricarus_auth Build / Clippy (push) Successful in 1m19s
soaricarus_auth Build / Test Suite (push) Successful in 1m19s
Closes #14

Reviewed-on: http://git.kundeng.us/phoenix/soaricarus_auth/pulls/15
2026-11-11 13:13:49 -05:00
+8 -1
View File
@@ -508,7 +508,13 @@ pub mod endpoint {
Ok(user) => {
let firstname = payload.firstname;
let lastname = payload.lastname;
match repo::user::update_user_profile(&pool, &user_id, &firstname, &lastname)
if firstname == user.firstname && lastname == user.lastname {
(axum::http::StatusCode::NOT_MODIFIED, axum::Json(response))
} else {
match repo::user::update_user_profile(
&pool, &user_id, &firstname, &lastname,
)
.await
{
Ok(_) => {
@@ -532,6 +538,7 @@ pub mod endpoint {
}
}
}
}
Err(err) => {
eprintln!("Error: {err:?}");
response.message = "ERROR".to_string();