aboutsummaryrefslogtreecommitdiff
path: root/src/handlers/mod.rs
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-07-20 10:31:01 -0400
committerCara Salter <cara@devcara.com>2022-07-20 10:31:01 -0400
commit4b616447715b8129ae322341959e1c2bfabbd10e (patch)
tree01c23c8a5e29d2821cdd1047d0ec27a69f8b1138 /src/handlers/mod.rs
parentb98646d8501689072f5624483d258adcbf6fc5c5 (diff)
downloadnccd-4b616447715b8129ae322341959e1c2bfabbd10e.tar.gz
nccd-4b616447715b8129ae322341959e1c2bfabbd10e.zip
emails
also subnet storage
Diffstat (limited to 'src/handlers/mod.rs')
-rw-r--r--src/handlers/mod.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index b83d83c..24db540 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -1,11 +1,13 @@
-use axum::{Router, routing::get};
+use axum::{Router, routing::{get, post}};
pub mod auth;
+mod nets;
pub async fn gen_routers() -> Router {
Router::new()
.nest("/auth", auth_routes().await)
+ .nest("/nets", net_routes().await)
}
async fn auth_routes() -> Router {
@@ -13,4 +15,10 @@ 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))
+ .route("/logout", post(auth::logout_post))
+}
+
+async fn net_routes() -> Router {
+ Router::new()
+ .route("/new", get(nets::new).post(nets::new_post))
}