From 5ed96f8e8b9d9f19ee249f5c73a5a21ef6bca09f Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 17 Jun 2025 02:03:28 -0400 Subject: Reorganize and consolidate HTTP routes. HTTP routes are now defined in a single, unified module, pulling them out of the topical modules they were formerly part of. This is intended to improve the navigability of the codebase. Previously, finding the handler corresponding to a specific endpoint required prior familiarity, though in practice you could usually guess from topic area. Now, all routes are defined in `crate::routes`. Other than changing visibility, I've avoided making changes to the handlers at the ends of those routes. --- src/setup/mod.rs | 4 ++-- src/setup/routes/mod.rs | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'src/setup') diff --git a/src/setup/mod.rs b/src/setup/mod.rs index a4b821c..e741a60 100644 --- a/src/setup/mod.rs +++ b/src/setup/mod.rs @@ -1,6 +1,6 @@ pub mod app; pub mod repo; mod required; -mod routes; +pub mod routes; -pub use self::{required::Required, routes::router}; +pub use self::required::Required; diff --git a/src/setup/routes/mod.rs b/src/setup/routes/mod.rs index 977a790..e94a249 100644 --- a/src/setup/routes/mod.rs +++ b/src/setup/routes/mod.rs @@ -1,11 +1,3 @@ -use axum::{Router, routing::post}; - -use crate::app::App; - -mod post; +pub mod post; #[cfg(test)] mod test; - -pub fn router() -> Router { - Router::new().route("/api/setup", post(post::handler)) -} -- cgit v1.2.3