diff --git a/src/handlers.rs b/src/handlers.rs index 02ff99394..ccb01eb3c 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -179,9 +179,9 @@ pub fn reply_thread(state: State, /// This handler executes a full-text search on the forum database and /// displays the results to the user. pub fn search_forum(state: State, - query: Form) -> ConverseResponse { - let query_string = query.0.query.clone(); - state.db.send(query.0) + query: Query) -> ConverseResponse { + let query_string = query.query.clone(); + state.db.send(query.into_inner()) .flatten() .and_then(move |results| state.renderer.send(SearchResultPage { results, diff --git a/src/main.rs b/src/main.rs index 92eeca48d..851e81041 100644 --- a/src/main.rs +++ b/src/main.rs @@ -153,7 +153,7 @@ fn main() { .resource("/thread/submit", |r| r.method(Method::POST).with3(submit_thread)) .resource("/thread/reply", |r| r.method(Method::POST).with3(reply_thread)) .resource("/thread/{id}", |r| r.method(Method::GET).with2(forum_thread)) - .resource("/search", |r| r.method(Method::POST).with2(search_forum)) + .resource("/search", |r| r.method(Method::GET).with2(search_forum)) .resource("/oidc/login", |r| r.method(Method::GET).with(login)) .resource("/oidc/callback", |r| r.method(Method::POST).with3(callback)); diff --git a/templates/index.html b/templates/index.html index d4daa216c..16ddf44c3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -14,7 +14,7 @@

Converse

-
+ New thread diff --git a/templates/search.html b/templates/search.html index 95384b1ca..3bb30e5d6 100644 --- a/templates/search.html +++ b/templates/search.html @@ -14,7 +14,7 @@

Converse

- + New thread