Skip to content

Commit

Permalink
fix(connectors): parse the annuaire adresse field
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil committed Oct 29, 2024
1 parent 49d362e commit 870d3d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/connectors/api-annuaire-service-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ export const getAnnuaireServicePublicContactEmail = async (
timeout: HTTP_CLIENT_TIMEOUT,
});

features = data.results;
features = data.results.map((feature) => ({
...feature,
// HACK(douglasduteil): the API returns a string instead of a JSON object in the adresse field
adresse: JSON.parse(feature.adresse as any),
}));
} catch (e) {
if (
e instanceof AxiosError &&
Expand Down

0 comments on commit 870d3d2

Please sign in to comment.