diff options
author | Mario Krehl <mario-krehl@gmx.de> | 2017-12-10 13:10:01 +0100 |
---|---|---|
committer | Mario Krehl <mario-krehl@gmx.de> | 2017-12-10 13:10:01 +0100 |
commit | 050478866508fa7c0033c9b05110d311a9d5b00f (patch) | |
tree | 97ce1560b7ee579f33bdb91e8d92cebe0dd71f82 | |
parent | 9bc85993c5edef3dac2665412fe36d9b80d2be8f (diff) |
Implement /search
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 94262fa..676d7e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,7 +43,12 @@ fn index() -> &'static str { #[post("/search", format = "application/json", data = "<data>")] fn search(data : Json<Search>, config: State<Config>) -> Json<SearchResponse> { - + debug!("handling search request: {:?}", data.0); + Json( + SearchResponse( + *config.all_aliases() + ) + ) } #[post("/query", format = "application/json", data = "<data>")] |