diff --git a/src/main.rs b/src/main.rs index d1490ce..9a487ad 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,10 +34,11 @@ async fn index() -> impl IntoResponse { async fn search(Query(params): Query>) -> 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) }