Use makeFetch method

This commit is contained in:
Julie Lenaerts 2024-10-21 15:38:46 +02:00
parent 7f1764658a
commit 34bbee2031

View File

@ -25,7 +25,8 @@ const getCivilities = () =>
}); });
const getGenders = () => const getGenders = () =>
fetch('/api/1.0/main/gender.json').then(response => { makeFetch("GET", '/api/1.0/main/gender.json').
.then(response => {
if (response.ok) { return response.json(); } if (response.ok) { return response.json(); }
throw Error('Error with request resource response'); throw Error('Error with request resource response');
}); });