AddPerson: add civility when creating a person

This commit is contained in:
nobohan
2022-04-14 18:04:36 +02:00
parent c1ec2933e5
commit 7a2151f23a
5 changed files with 41 additions and 6 deletions

View File

@@ -14,8 +14,13 @@ const getPersonAltNames = () =>
fetch('/api/1.0/person/config/alt_names.json').then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});;
});
const getCivilities = () =>
fetch('/api/1.0/main/civility.json').then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
/*
* POST a new person
@@ -56,6 +61,7 @@ const patchPerson = (id, body) => {
export {
getPerson,
getPersonAltNames,
getCivilities,
postPerson,
patchPerson
};