diff --git a/src/lib.rs b/src/lib.rs index ab7594a..ebd1efd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,13 @@ i18n!("locales", fallback = "de-AT"); use admin::station::Station; use auth::Backend; -use axum::{body::Body, extract::FromRef, response::Response, routing::get, Router}; +use axum::{ + body::Body, + extract::FromRef, + response::{IntoResponse, Redirect, Response}, + routing::get, + Router, +}; use axum_login::AuthManagerLayerBuilder; use partials::page; use sqlx::SqlitePool; @@ -148,6 +154,10 @@ async fn logo_ver_inv() -> Response
{ .unwrap() } +async fn redirect() -> impl IntoResponse { + Redirect::to("/admin") +} + #[derive(Clone)] struct AppState { db: Arc