1
0
mirror of https://github.com/actix/examples synced 2024-12-02 18:02:22 +01:00
examples/web-cors/backend/src/user.rs
2019-03-29 13:43:03 -07:00

20 lines
483 B
Rust

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