person: add altnames in the person creation modal

This commit is contained in:
nobohan
2021-11-26 18:04:46 +01:00
parent d71d1beb42
commit 780b7db8cb
3 changed files with 38 additions and 3 deletions

View File

@@ -10,6 +10,13 @@ const getPerson = (id) => {
});
};
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');
});;
/*
* POST a new person
*/
@@ -48,6 +55,7 @@ const patchPerson = (id, body) => {
export {
getPerson,
getPersonAltNames,
postPerson,
patchPerson
};