summaryrefslogtreecommitdiff
path: root/src/ui/routes/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/routes/mod.rs')
-rw-r--r--src/ui/routes/mod.rs35
1 files changed, 7 insertions, 28 deletions
diff --git a/src/ui/routes/mod.rs b/src/ui/routes/mod.rs
index dc94773..2390802 100644
--- a/src/ui/routes/mod.rs
+++ b/src/ui/routes/mod.rs
@@ -1,28 +1,7 @@
-use axum::{Router, response::Redirect, routing::get};
-
-use crate::app::App;
-
-mod ch;
-mod get;
-mod invite;
-mod login;
-mod me;
-mod path;
-mod setup;
-
-pub fn router(app: &App) -> Router<App> {
- [
- Router::new()
- .route("/{*path}", get(path::get::handler))
- .route("/setup", get(setup::get::handler)),
- Router::new()
- .route("/", get(get::handler))
- .route("/me", get(me::get::handler))
- .route("/login", get(login::get::handler))
- .route("/ch/{channel}", get(ch::channel::get::handler))
- .route("/invite/{invite}", get(invite::invite::get::handler))
- .route_layer(crate::setup::Required(app.clone()).with_fallback(Redirect::to("/setup"))),
- ]
- .into_iter()
- .fold(Router::default(), Router::merge)
-}
+pub mod ch;
+pub mod get;
+pub mod invite;
+pub mod login;
+pub mod me;
+pub mod path;
+pub mod setup;