fix html5 birthdate field on modal form OnTheFly

This commit is contained in:
2021-06-03 14:34:52 +02:00
parent 4d0cfbb396
commit 937be1af3a
3 changed files with 20 additions and 42 deletions

View File

@@ -11,20 +11,7 @@ const getPerson = (id) => {
};
/*
* GET a thirdparty by id
* TODO move in ChillThirdpartyAssets !!
*/
const getThirdparty = (id) => {
const url = `/api/1.0/thirdparty/thirdparty/${id}.json`;
return fetch(url)
.then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
};
/*
* POST a person
* POST a new person
*/
const postPerson = (body) => {
const url = `/api/1.0/person/person.json`;
@@ -43,6 +30,5 @@ const postPerson = (body) => {
export {
getPerson,
getThirdparty,
postPerson
};