wip
This commit is contained in:
parent
66b3a99814
commit
98be8dd574
13 changed files with 329 additions and 46 deletions
17
src/controllers/ui/home.rs
Normal file
17
src/controllers/ui/home.rs
Normal 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()
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue