Merge branch 'develop' into 4-ivago-calendar

master
Jef Roosens 2021-04-02 21:14:44 +02:00
commit 8bc71b3214
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 2 additions and 2 deletions

View File

@ -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()),