fix search

This commit is contained in:
Vri 🌈 2023-11-15 20:20:04 +01:00
parent eedf62b46c
commit 48e2fb42e5
Signed by: vrifox
SSH key fingerprint: SHA256:7OLOvW+jmULkXpdl5rUWgid7WJQhOIEgj+4WP/PtCpI

View file

@ -34,10 +34,11 @@ async fn index() -> impl IntoResponse {
async fn search(Query(params): Query<HashMap<String, String>>) -> impl IntoResponse {
let tera = tera_create();
let mut context = tera::Context::new();
let rendered = tera.render("search.html", &context).unwrap();
context.insert("query", params.get("q").unwrap());
let rendered = tera.render("search.html", &context).unwrap();
header(rendered)
}