pub async fn update_user_profile(&self, id: i64, profile: &UserProfile) -> Result<()> {
        let path = format!("/users/{}", id);
        let resp = self.build_request(Method::PUT, path).json(profile).send().await?;
        if resp.status().eq(&StatusCode::OK) {
            Ok(())
        } else {
            Err(anyhow!("failed to update user profile: {}", resp.text().await?))
        }
    }
/// Update a registered user to change his profile.
Update a registered user to change his profile.
Update a registered user to change his profile .
pub async fn update_user_profile(&self, id: i64, profile: &UserProfile) -> Result<()> {
        let path = format!("/users/{}", id);
        let resp = self.build_request(Method::PUT, path).json(profile).send().await?;
        if resp.status().eq(&StatusCode::OK) {
            Ok(())
        } else {
            Err(anyhow!("failed to update user profile: {}", resp.text().await?))
        }
    }
pub async fn update_user_profile ( & self , id : i64 , profile : & UserProfile ) -> Result < ( ) > { let path = format ! ( " " id ) ; let resp = self . build_request ( Method :: PUT , path ) . json ( profile ) . send ( ) . await ? ; if resp . status ( ) . eq ( & StatusCode :: OK ) { Ok ( ( ) ) } else { Err ( anyhow ! ( " " resp text ( ) await ) ) } }
Update a registered user to change his profile.
Update a registered user to change his profile .
&self
id
i64
profile
&UserProfile
&self
id
i64
profile
&UserProfile