Removed unnecessary content type
parent
e81205bef7
commit
7f8da3e584
|
@ -12,7 +12,7 @@ pub fn routes() -> Vec<rocket::Route> {
|
||||||
// URL: https://www.ivago.be/nl/particulier/autocomplete/garbage/streets?q=Lange
|
// URL: https://www.ivago.be/nl/particulier/autocomplete/garbage/streets?q=Lange
|
||||||
// TODO make this async
|
// TODO make this async
|
||||||
// TODO change this so it can return errors instead of empty json
|
// TODO change this so it can return errors instead of empty json
|
||||||
#[get("/search?<street>", format="json")]
|
#[get("/search?<street>")]
|
||||||
pub fn search_streets_json(street: String) -> Json<Vec<controller::Street>> {
|
pub fn search_streets_json(street: String) -> Json<Vec<controller::Street>> {
|
||||||
match controller::search_streets(&street) {
|
match controller::search_streets(&street) {
|
||||||
Ok(streets) => Json(streets),
|
Ok(streets) => Json(streets),
|
||||||
|
|
Loading…
Reference in New Issue