2019-03-29 21:43:03 +01:00
|
|
|
use actix_web::web;
|
2018-04-13 03:18:42 +02:00
|
|
|
|
2018-05-08 20:08:43 +02:00
|
|
|
#[derive(Deserialize, Serialize, Debug)]
|
2018-04-13 10:03:58 +02:00
|
|
|
pub struct Info {
|
2018-04-13 03:18:42 +02:00
|
|
|
username: String,
|
|
|
|
email: String,
|
|
|
|
password: String,
|
|
|
|
confirm_password: String,
|
|
|
|
}
|
|
|
|
|
2019-03-29 21:43:03 +01:00
|
|
|
pub fn info(info: web::Json<Info>) -> web::Json<Info> {
|
2018-04-13 10:03:58 +02:00
|
|
|
println!("=========={:?}=========", info);
|
2019-03-29 21:43:03 +01:00
|
|
|
web::Json(Info {
|
2018-05-08 20:08:43 +02:00
|
|
|
username: info.username.clone(),
|
|
|
|
email: info.email.clone(),
|
|
|
|
password: info.password.clone(),
|
|
|
|
confirm_password: info.confirm_password.clone(),
|
2019-03-29 21:43:03 +01:00
|
|
|
})
|
2018-04-13 03:18:42 +02:00
|
|
|
}
|