get options and display selected

This commit is contained in:
2021-05-21 16:04:01 +02:00
parent a88acd34fd
commit 4d12796289
4 changed files with 73 additions and 33 deletions

View File

@@ -146,6 +146,25 @@ const postResource = (id, payload, method) => {
});
};
/*
*
*/
const postSocialIssue = (id, body, method) => {
console.log('body + method', body, method);
const url = `/api/1.0/person/accompanying-course/${id}/socialissue.json`;
return fetch(url, {
method: method,
headers: {
'Content-Type': 'application/json;charset=utf-8'
},
body: JSON.stringify(body)
})
.then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
};
export {
getAccompanyingCourse,
patchAccompanyingCourse,
@@ -154,4 +173,5 @@ export {
postParticipation,
postRequestor,
postResource,
postSocialIssue
};