prepare new originDemand sub-component

This commit is contained in:
2021-06-25 13:44:01 +02:00
parent 662e5f967c
commit 3e83891744
4 changed files with 73 additions and 0 deletions

View File

@@ -165,6 +165,33 @@ const postSocialIssue = (id, body, method) => {
});
};
const getUsers = () => {
const url = `/api/1.0/...json`;
return fetch(url)
.then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
};
const getListOrigins = () => {
const url = `/api/1.0/person/accompanying-period/origin.json`;
return fetch(url)
.then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
}
const getOrigin = (id) => {
const url = `/api/1.0/person/accompanying-period/origin/${id}.json`;
return fetch(url)
.then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
}
export {
getAccompanyingCourse,
patchAccompanyingCourse,
@@ -173,5 +200,8 @@ export {
postParticipation,
postRequestor,
postResource,
getUsers,
getListOrigins,
getOrigin,
postSocialIssue
};