use axum::{Router, extract::State, response::IntoResponse, routing::get}; use crate::{WebError, template}; pub(crate) fn build() -> Router { Router::new() .route("/", get(index)) .route(&format!("{}/", crate::ROUTE_PREFIX), get(index)) } async fn index(State(services): State) -> Result { template! { struct Index<'a> use "index.html.j2" { server_name: &'a str, first_run: bool } } Ok(Index::new( &services, services.globals.server_name().as_str(), services.firstrun.is_first_run(), ) .into_response()) }