1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
use DTO;
#[derive(Clone, RustcEncodable, RustcDecodable)]
pub struct RegisterDTO {
pub username: String,
pub password: String,
pub email: String,
pub referer: Option<String>,
}
impl DTO for RegisterDTO {}
#[derive(RustcEncodable, RustcDecodable)]
pub struct LoginDTO {
pub user_email: String,
pub password: String,
pub remember_me: bool,
}
impl DTO for LoginDTO {}
#[derive(Clone, RustcEncodable, RustcDecodable)]
pub struct ResetPasswordDTO {
pub email: String,
}
impl DTO for ResetPasswordDTO {}
#[derive(RustcEncodable, RustcDecodable)]
pub struct NewPasswordDTO {
pub new_password: String,
}
impl DTO for NewPasswordDTO {}