Skip to content

Commit c68c96a

Browse files
committed
router: redirect / to /about
For now we only have the about page. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
1 parent 8a7bdad commit c68c96a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/router.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ use std::sync::Arc;
22

33
#[cfg(feature = "stt")]
44
use axum::routing::post;
5-
use axum::{Router, routing::get};
5+
use axum::{Router, response::Redirect, routing::get};
66
use tokio::net::TcpListener;
77

88
use crate::state::State;
99

1010
pub fn router(state: State) -> axum::Router {
1111
#[allow(unused_mut)]
1212
let mut router = Router::new()
13+
.route("/", get(|| async { Redirect::temporary("/about") }))
1314
.route("/about", get(crate::ui::handlers::about))
1415
.route("/health", get(crate::routes::health::check));
1516

0 commit comments

Comments
 (0)