Create gender API and adjust serialization of gender property

This commit is contained in:
2024-10-01 11:41:19 +02:00
parent 34e2a26d1e
commit 2eb686ffdb
5 changed files with 44 additions and 3 deletions

View File

@@ -24,6 +24,12 @@ const getCivilities = () =>
throw Error('Error with request resource response');
});
const getGenders = () =>
fetch('/api/1.0/main/gender.json').then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
const getCentersForPersonCreation = () => makeFetch('GET', '/api/1.0/person/creation/authorized-centers', null);
/*
@@ -67,6 +73,7 @@ export {
getPerson,
getPersonAltNames,
getCivilities,
getGenders,
postPerson,
patchPerson
};