Skip to content

Commit

Permalink
Fix get_or_create_city() (#20)
Browse files Browse the repository at this point in the history
The city attributes are stored in TitleCase, therefore we must
ensure that GET requests use the correct case as well.

Signed-off-by: Rémy Greinhofer <[email protected]>
  • Loading branch information
rgreinho authored Dec 7, 2024
1 parent 10ce66c commit 6551b15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lambdas/src/bna-save-results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ async fn get_or_create_city(
let response = client
.get_city()
.country(normalized_country)
.region(region)
.name(name)
.region(region.to_title_case())
.name(name.to_title_case())
.send()
.await?;
let city: Option<City> = match response.status().as_u16() {
Expand Down

0 comments on commit 6551b15

Please sign in to comment.