vue accompanyingcourse: ending referrer subcomponent

This commit is contained in:
2021-06-30 11:59:54 +02:00
parent 196f709065
commit d3ac8d8ceb
3 changed files with 66 additions and 43 deletions

View File

@@ -166,7 +166,16 @@ const postSocialIssue = (id, body, method) => {
};
const getUsers = () => {
const url = `/api/1.0/...json`;
const url = `/api/1.0/main/user.json`;
return fetch(url)
.then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
};
const whoami = () => {
const url = `/api/1.0/main/whoami.json`;
return fetch(url)
.then(response => {
if (response.ok) { return response.json(); }
@@ -201,6 +210,7 @@ export {
postRequestor,
postResource,
getUsers,
whoami,
getListOrigins,
getOrigin,
postSocialIssue