show users as suggestions, not in constrained list

This commit is contained in:
2021-10-20 19:59:08 +02:00
parent 0a058bad82
commit 3f138dc152
13 changed files with 197 additions and 42 deletions

View File

@@ -170,11 +170,8 @@ const postSocialIssue = (id, body, method) => {
const getUsers = () => {
const url = `/api/1.0/main/user.json`;
return fetch(url)
.then(response => {
if (response.ok) { return response.json(); }
throw { msg: 'Error while retriving users.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
});
return fetchResults(url);
};
const whoami = () => {
@@ -235,8 +232,8 @@ const removeScope = (id, scope) => {
});
};
const getAvailableReferrals = (course) => {
const url = `/api/1.0/person/accompanying-course/${course.id}/referral-availables.json`;
const getReferrersSuggested = (course) => {
const url = `/api/1.0/person/accompanying-course/${course.id}/referrers-suggested.json`;
return fetchResults(url);
}
@@ -255,5 +252,5 @@ export {
postSocialIssue,
addScope,
removeScope,
getAvailableReferrals
getReferrersSuggested,
};