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
|
||||
// TODO make this async
|
||||
// TODO change this so it can return errors instead of empty json
|
||||
#[get("/search?<street>", format="json")]
|
||||
pub fn route_search_streets(street: String) -> Json<Vec<controller::Street>> {
|
||||
#[get("/search?<street>")]
|
||||
pub fn search_streets_json(street: String) -> Json<Vec<controller::Street>> {
|
||||
match controller::search_streets(&street) {
|
||||
Ok(streets) => Json(streets),
|
||||
Err(err) => Json(Vec::new()),
|
||||
|
|
Loading…
Reference in New Issue