pub fn recover(&self, email: &str, code: &str) -> Result<RecoverResponse, u8> {
        match self
            .client
            .post("https://training.olinfo.it/api/user")
            .json(&serde_json::json!({"action":"recover","code":code,"email":email}))
            .send()
        {
            Ok(mut response) => match response.json::<RecoverResponse>() {
                Ok(resp) => match resp.success {
                    1 => Ok(resp),
                    _ => Err(3),
                },
                _ => Err(2),
            },
            _ => Err(1),
        }
    }
/// recover lost password, use empty code to get the email
///
/// [example cms page](https://training.olinfo.it/#/forgot-account)
recover lost password, use empty code to get the email
[example cms page]
recover lost password use empty code to get the email [ example cms page ]
pub fn recover(&self, email: &str, code: &str) -> Result<RecoverResponse, u8> {
        match self
            .client
            .post("https://training.olinfo.it/api/user")
            .json(&serde_json::json!({"action":"recover","code":code,"email":email}))
            .send()
        {
            Ok(mut response) => match response.json::<RecoverResponse>() {
                Ok(resp) => match resp.success {
                    1 => Ok(resp),
                    _ => Err(3),
                },
                _ => Err(2),
            },
            _ => Err(1),
        }
    }
pub fn recover ( & self , email : & str , code : & str ) -> Result < RecoverResponse , u8 > { match self . client . post ( " " ) . json ( & serde_json :: json ! ( { " " " " " " code " " email } ) ) . send ( ) { Ok ( mut response ) => match response . json :: < RecoverResponse > ( ) { Ok ( resp ) => match resp . success { 1 => Ok ( resp ) , _ => Err ( 3 ) , } , _ => Err ( 2 ) , } , _ => Err ( 1 ) , } }
recover lost password, use empty code to get the email
[example cms page](https://training.olinfo.it/#/forgot-account)
recover lost password use empty code to get the email [ example cms page ] ( https : // training . olinfo . it / # / forgot - account )
&self
email
&str
code
&str
&self
email
&str
code
&str