fix: actually update the display name
This commit is contained in:
@@ -27,7 +27,6 @@ pub struct UserProfileData {
|
|||||||
#[derive(Validate, Serialize, Deserialize, JsonSchema)]
|
#[derive(Validate, Serialize, Deserialize, JsonSchema)]
|
||||||
pub struct DataEditUser {
|
pub struct DataEditUser {
|
||||||
/// New display name
|
/// New display name
|
||||||
#[serde(rename = "displayName")]
|
|
||||||
#[validate(length(min = 2, max = 32), regex = "RE_DISPLAY_NAME")]
|
#[validate(length(min = 2, max = 32), regex = "RE_DISPLAY_NAME")]
|
||||||
display_name: Option<String>,
|
display_name: Option<String>,
|
||||||
/// Attachment Id for avatar
|
/// Attachment Id for avatar
|
||||||
@@ -123,6 +122,7 @@ pub async fn req(
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut partial: PartialUser = PartialUser {
|
let mut partial: PartialUser = PartialUser {
|
||||||
|
display_name: data.display_name,
|
||||||
badges: data.badges,
|
badges: data.badges,
|
||||||
flags: data.flags,
|
flags: data.flags,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|||||||
Reference in New Issue
Block a user