mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
add a patch resource api endpoint (wip)
This commit is contained in:
@@ -353,6 +353,23 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
||||
throw error;
|
||||
})
|
||||
},
|
||||
patchResource({ commit }, payload) {
|
||||
const body = { type: "accompanying_period_resource" };
|
||||
body['resource'] = {
|
||||
type: payload.result.type,
|
||||
id: payload.result.id
|
||||
};
|
||||
const url = `/api/1.0/person/accompanying-course/resource/${id}.json`;
|
||||
|
||||
return makeFetch('PATCH', url, body)
|
||||
.then((response) => {
|
||||
commit('patchResource', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
commit('catchError', error);
|
||||
throw error;
|
||||
})
|
||||
},
|
||||
/**
|
||||
* On The Fly
|
||||
*/
|
||||
|
Reference in New Issue
Block a user