diff options
author | Cara Salter <cara@devcara.com> | 2022-07-19 19:49:39 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-07-19 19:49:39 -0400 |
commit | c742b752140ab0eee6e353c779bd897042ba6739 (patch) | |
tree | 58953fdcaedb7e6c458a29dd980b8f97fb1af2a7 /src/handlers/mod.rs | |
parent | 1bd04149f8f6133b817a37a37a91397750c76c1b (diff) | |
download | nccd-c742b752140ab0eee6e353c779bd897042ba6739.tar.gz nccd-c742b752140ab0eee6e353c779bd897042ba6739.zip |
Big login system
Still needs cookies, but those are coming! (and should be set anyways!)
Diffstat (limited to 'src/handlers/mod.rs')
-rw-r--r-- | src/handlers/mod.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs new file mode 100644 index 0000000..4076e68 --- /dev/null +++ b/src/handlers/mod.rs @@ -0,0 +1,16 @@ +use axum::{Router, routing::get}; + +mod auth; + +pub async fn gen_routers() -> Router { + + Router::new() + .nest("/auth", auth_routes().await) +} + +async fn auth_routes() -> Router { + + Router::new() + .route("/login", get(auth::login).post(auth::login_post)) + .route("/register", get(auth::register).post(auth::register_post)) +} |