This commit is contained in:
Matthieu Bessat 2024-10-15 12:10:46 +02:00
parent 66b3a99814
commit 98be8dd574
13 changed files with 329 additions and 46 deletions

View file

@ -0,0 +1,17 @@
use axum::{extract::State, response::{Html, IntoResponse}};
use axum_macros::debug_handler;
use minijinja::context;
use crate::server::AppState;
#[debug_handler]
pub async fn home(
State(app_state): State<AppState>
) -> impl IntoResponse {
Html(
app_state.templating_env.get_template("pages/home.html").unwrap()
.render(context!())
.unwrap()
)
}