mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Use makeFetch method
This commit is contained in:
parent
7f1764658a
commit
34bbee2031
@ -25,7 +25,8 @@ const getCivilities = () =>
|
||||
});
|
||||
|
||||
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(); }
|
||||
throw Error('Error with request resource response');
|
||||
});
|
||||
@ -69,7 +70,7 @@ const patchPerson = (id, body) => {
|
||||
};
|
||||
|
||||
export {
|
||||
getCentersForPersonCreation,
|
||||
getCentersForPersonCreation,
|
||||
getPerson,
|
||||
getPersonAltNames,
|
||||
getCivilities,
|
||||
|
Loading…
x
Reference in New Issue
Block a user