use actix_web::{Json, Result}; #[derive(Deserialize, Serialize, Debug)] pub struct Info { username: String, email: String, password: String, confirm_password: String, } pub fn info(info: Json) -> Result> { println!("=========={:?}=========", info); Ok(Json(Info { username: info.username.clone(), email: info.email.clone(), password: info.password.clone(), confirm_password: info.confirm_password.clone(), })) }