Doc changes
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user