mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
enable fetch post/delete socialIssues
This commit is contained in:
parent
21cc0007fb
commit
69ecc42055
@ -150,7 +150,7 @@ const postResource = (id, payload, method) => {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const postSocialIssue = (id, body, method) => {
|
const postSocialIssue = (id, body, method) => {
|
||||||
console.log('api body and method', body, method);
|
//console.log('api body and method', body, method);
|
||||||
const url = `/api/1.0/person/accompanying-course/${id}/socialissue.json`;
|
const url = `/api/1.0/person/accompanying-course/${id}/socialissue.json`;
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
method: method,
|
method: method,
|
||||||
|
@ -180,13 +180,12 @@ let initPromise = getAccompanyingCourse(id)
|
|||||||
},
|
},
|
||||||
updateSocialIssues({ commit }, { payload, body, method }) {
|
updateSocialIssues({ commit }, { payload, body, method }) {
|
||||||
//console.log('## action: payload', { payload, body, method });
|
//console.log('## action: payload', { payload, body, method });
|
||||||
|
postSocialIssue(id, body, method)
|
||||||
//postSocialIssue(id, body, method)
|
.then(response => new Promise((resolve, reject) => {
|
||||||
//.then(response => new Promise((resolve, reject) => {
|
console.log('response', response);
|
||||||
// console.log('response', response);
|
|
||||||
commit('updateSocialIssues', payload);
|
commit('updateSocialIssues', payload);
|
||||||
// resolve();
|
resolve();
|
||||||
//})).catch((error) => { commit('catchError', error) });
|
})).catch((error) => { commit('catchError', error) });
|
||||||
},
|
},
|
||||||
confirmAccompanyingCourse({ commit }) {
|
confirmAccompanyingCourse({ commit }) {
|
||||||
//console.log('## action: confirmAccompanyingCourse');
|
//console.log('## action: confirmAccompanyingCourse');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user