diff options
Diffstat (limited to 'src/invite')
| -rw-r--r-- | src/invite/mod.rs | 8 | ||||
| -rw-r--r-- | src/invite/routes/mod.rs | 18 |
2 files changed, 6 insertions, 20 deletions
diff --git a/src/invite/mod.rs b/src/invite/mod.rs index 2d32fda..3932eea 100644 --- a/src/invite/mod.rs +++ b/src/invite/mod.rs @@ -1,11 +1,11 @@ +use crate::{clock::DateTime, normalize::nfc, user}; + pub mod app; mod id; mod repo; -mod routes; - -use crate::{clock::DateTime, normalize::nfc, user}; +pub mod routes; -pub use self::{id::Id, routes::router}; +pub use self::id::Id; #[derive(Debug, serde::Serialize)] pub struct Invite { diff --git a/src/invite/routes/mod.rs b/src/invite/routes/mod.rs index d83efc6..8747a4e 100644 --- a/src/invite/routes/mod.rs +++ b/src/invite/routes/mod.rs @@ -1,18 +1,4 @@ -use axum::{ - Router, - routing::{get, post}, -}; - -use crate::app::App; - -mod invite; -mod post; +pub mod invite; +pub mod post; #[cfg(test)] mod test; - -pub fn router() -> Router<App> { - Router::new() - .route("/api/invite", post(post::handler)) - .route("/api/invite/{invite}", get(invite::get::handler)) - .route("/api/invite/{invite}", post(invite::post::handler)) -} |
