Add a location option to the program, for using with other canteens than the one in N58 #1

Open
myrkvi wants to merge 3 commits from feature/add-location-option into main
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 0141e9de76 - Show all commits

View File

@ -50,7 +50,7 @@ pub(crate) fn get_cached_or_fetch_data(location: &str, now: DateTime<Utc>) -> an
items: ureq::get(&format!("{}?lokasjon={}&dato=", MENU_URL, location)).call()?
.into_string()?
.html_string_to_vec()?,
soup_items: ureq::get(&format!("{}?lokasjon={}&dato=",MENU_URL, location)).call()?
soup_items: ureq::get(&format!("{}?lokasjon={}&dato=",SOUP_URL, location)).call()?
.into_string()?
.html_string_to_vec()?,
};
@ -67,7 +67,7 @@ pub(crate) fn get_cached_or_fetch_data(location: &str, now: DateTime<Utc>) -> an
items: ureq::get(&format!("{}?lokasjon={}&dato=", MENU_URL, location)).call()?
.into_string()?
.html_string_to_vec()?,
soup_items: ureq::get(&format!("{}?lokasjon={}&dato=",MENU_URL, location)).call()?
soup_items: ureq::get(&format!("{}?lokasjon={}&dato=",SOUP_URL, location)).call()?
.into_string()?
.html_string_to_vec()?,
};