diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2024-04-08 16:31:44 -0500 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2024-04-11 23:49:41 -0500 |
commit | d9ed52fc239e3547eb99fe03bd296ab2808d2ebc (patch) | |
tree | 2fdc8a0e33bdf0902f608daa8e41d61df80ea9b2 /src/routes/register.rs | |
parent | 9a6c04d52edb10431f9f5ca2dbc83c410cb5daee (diff) |
wip: impl jwt handling
Diffstat (limited to 'src/routes/register.rs')
-rw-r--r-- | src/routes/register.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/routes/register.rs b/src/routes/register.rs index d2a570c..2181808 100644 --- a/src/routes/register.rs +++ b/src/routes/register.rs @@ -6,13 +6,16 @@ use argon2::{ }; use axum::{extract::State, http::StatusCode, response::IntoResponse, Json}; use axum_extra::routing::TypedPath; -use serde::Deserialize; +use serde::{Deserialize, Serialize}; -use crate::{ - model::{RegisterSchema, UserSchema}, - state::AppState, - Error, -}; +use crate::{model::UserSchema, state::AppState, Error}; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct RegisterSchema { + pub name: String, + pub email: String, + pub password: String, +} #[derive(Debug, Deserialize, TypedPath)] #[typed_path("/api/register")] |