From 5c54bea11d28cf44b70d28ca9e968c1703e8eedc Mon Sep 17 00:00:00 2001 From: Davy Date: Thu, 7 Mar 2024 16:22:27 +0100 Subject: [PATCH] fix: change api city query param --- pwa/interfaces/Gouv.ts | 1 + pwa/utils/apiCity.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pwa/interfaces/Gouv.ts b/pwa/interfaces/Gouv.ts index 48f7e151..fac7db03 100644 --- a/pwa/interfaces/Gouv.ts +++ b/pwa/interfaces/Gouv.ts @@ -29,6 +29,7 @@ export interface City { article: string; nom_commune: string; nom_commune_complet: string; + nom_commune_complet_formatte: string; department: Departement | null; } diff --git a/pwa/utils/apiCity.ts b/pwa/utils/apiCity.ts index f9554902..10cd0f38 100644 --- a/pwa/utils/apiCity.ts +++ b/pwa/utils/apiCity.ts @@ -27,7 +27,7 @@ const gouvCities = async (search: string) => { try { const response = await fetch( - `https://api-address-09a561047853.herokuapp.com/api/cities?nom_commune_postal=${search}` + `https://api-address-09a561047853.herokuapp.com/api/cities?nom_commune_complet_formatte=${search}` ); const data = await response.json();