From e1e61008824b603a436869eef8e5b25de4572217 Mon Sep 17 00:00:00 2001 From: jakubmanczak Date: Sun, 14 Jul 2024 00:16:59 +0200 Subject: [PATCH] add 200 OK on root path --- src/routes/mod.rs | 2 ++ src/routes/root.rs | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 src/routes/root.rs diff --git a/src/routes/mod.rs b/src/routes/mod.rs index eddb2ec..a7a0ebb 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -1,6 +1,7 @@ use axum::Router; mod health; +mod root; mod splash; mod teapot; mod version; @@ -8,6 +9,7 @@ mod version; pub fn routes() -> Router { Router::new() .merge(health::route()) + .merge(root::route()) .merge(splash::route()) .merge(teapot::route()) .merge(version::route()) diff --git a/src/routes/root.rs b/src/routes/root.rs new file mode 100644 index 0000000..fdc557c --- /dev/null +++ b/src/routes/root.rs @@ -0,0 +1,7 @@ +use axum::{routing::get, Router}; + +pub fn route() -> Router { + Router::new().route("/", get(root)) +} + +async fn root() -> () {}