Merge branch 'master' of gitlab.com:lilcity/backend into feature/end-video-popup-28-05-19

remotes/origin/feature/end-video-popup-28-05-19
gzbender 7 years ago
commit 16d1ddf293
  1. 4
      web/src/components/blocks/BlockImages.vue
  2. 7
      web/src/js/modules/api.js

@ -72,11 +72,11 @@
},
onRemoveImage(index) {
let images = this.images;
let id = images[index].image_id;
const id = images[index].image_id;
api.removeImage(id, this.accessToken)
.then(response => {
images.splice(index, 1);
images = images.filter(image => image.image_id != id);
this.$emit('update:images', images);
});
}

@ -75,6 +75,13 @@ export const api = {
}
});
},
removeGalleryImage: (galleryImageId, accessToken) => {
return api.delete(`/api/v1/gallery-images/${galleryImageId}/`, {
headers: {
'Authorization': `Token ${accessToken}`,
}
});
},
loadCourse: (courseId, accessToken) => {
return api.get(`/api/v1/courses/${courseId}/`, {
headers: {

Loading…
Cancel
Save