Merge branch 'develop' into 4-ivago-calendar
commit
8bc71b3214
|
@ -13,8 +13,8 @@ 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 route_search_streets(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),
|
||||||
Err(err) => Json(Vec::new()),
|
Err(err) => Json(Vec::new()),
|
||||||
|
|
Loading…
Reference in New Issue