From 64d5f37d9e28363f27b49b9a5b421a19792d0165 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 13 Sep 2022 14:51:32 +0200 Subject: Signup route --- src/models/auth.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/models/auth.rs') diff --git a/src/models/auth.rs b/src/models/auth.rs index 8a70244..651bf26 100644 --- a/src/models/auth.rs +++ b/src/models/auth.rs @@ -32,13 +32,22 @@ pub struct AuthBody { token_type: String, } -/// Payload used for user creation +/// Payload used for login #[derive(Deserialize)] pub struct LoginCredentials { pub username: String, pub password: String, } +/// Paylod used for user creation +#[derive(Deserialize)] +pub struct SignUpForm { + pub email: String, + pub username: String, + pub password1: String, + pub password2: String, +} + static KEYS: Lazy = Lazy::new(|| { let secret = &crate::config::CONFIG.jwt_secret; Keys::new(secret.as_bytes()) -- cgit v1.2.3-71-g8e6c