Update name of user endpoint #9

Merged
phoenix merged 7 commits from update_name_of_user into main 2026-06-12 17:27:47 -04:00
Showing only changes of commit ab112a56af - Show all commits
+3 -2
View File
@@ -750,7 +750,8 @@ pub async fn update_password(
content_type = "application/json"
),
responses(
(status = 200, description = "User login successful", body = response::UserUpdateNameResponse),
(status = 200, description = "Names were updated", body = response::UserUpdateNameResponse),
(status = 304, description = "Nothing to change", body = response::UserUpdateNameResponse),
(status = 400, description = "Bad data", body = response::UserUpdateNameResponse),
(status = 500, description = "Something went wrong", body = response::UserUpdateNameResponse)
)
@@ -765,7 +766,7 @@ pub async fn update_name_of_user(
let (valid_request, reason) = payload.is_valid();
if !valid_request {
(
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::http::StatusCode::BAD_REQUEST,
axum::Json(response::UserUpdateNameResponse {
message: reason.unwrap_or_default(),
data: Vec::new(),