fix search
This commit is contained in:
parent
eedf62b46c
commit
48e2fb42e5
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue