mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-27 03:41:32 +01:00
tailwind and static files init
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
use axum::{response::Html, Extension};
|
||||
use serde_json::json;
|
||||
use tera::{Context, Tera};
|
||||
|
||||
use crate::error::ApiError;
|
||||
|
||||
pub async fn index_handler(Extension(tera): Extension<Tera>) -> Result<Html<String>, ApiError> {
|
||||
let output = tera.render("index.html", &Context::new()).unwrap();
|
||||
let output = tera
|
||||
.render(
|
||||
"index.html",
|
||||
&Context::from_value(json!({"adjective": "CRAYCRAY"})).unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
Ok(output.into())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user