mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
update list of referrers when loading and updating some parts of the course
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { fetchResults } from 'ChillMainAssets/lib/api/download.js';
|
||||
|
||||
/*
|
||||
* Endpoint v.2 chill_api_single_accompanying_course__entity
|
||||
* method GET/HEAD, get AccompanyingCourse Instance
|
||||
@@ -216,8 +218,6 @@ const addScope = (id, scope) => {
|
||||
|
||||
const removeScope = (id, scope) => {
|
||||
const url = `/api/1.0/person/accompanying-course/${id}/scope.json`;
|
||||
console.log(url);
|
||||
console.log(scope);
|
||||
|
||||
return fetch(url, {
|
||||
method: 'DELETE',
|
||||
@@ -235,6 +235,12 @@ const removeScope = (id, scope) => {
|
||||
});
|
||||
};
|
||||
|
||||
const getAvailableReferrals = (course) => {
|
||||
const url = `/api/1.0/person/accompanying-course/${course.id}/referral-availables.json`;
|
||||
|
||||
return fetchResults(url);
|
||||
}
|
||||
|
||||
export {
|
||||
getAccompanyingCourse,
|
||||
patchAccompanyingCourse,
|
||||
@@ -249,4 +255,5 @@ export {
|
||||
postSocialIssue,
|
||||
addScope,
|
||||
removeScope,
|
||||
getAvailableReferrals
|
||||
};
|
||||
|
Reference in New Issue
Block a user