Fixes image deletion failing in subdirectory.

Fixes #1092

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
This commit is contained in:
Abijeet 2018-11-25 00:46:04 +05:30
parent 302b53562d
commit eac82c47a5

View File

@ -159,8 +159,8 @@ const methods = {
}); });
return; return;
} }
let url = window.baseUrl(`/images/${this.selectedImage.id}`);
this.$http.delete(`/images/${this.selectedImage.id}`).then(resp => { this.$http.delete(url).then(resp => {
this.images.splice(this.images.indexOf(this.selectedImage), 1); this.images.splice(this.images.indexOf(this.selectedImage), 1);
this.selectedImage = false; this.selectedImage = false;
this.$events.emit('success', trans('components.image_delete_success')); this.$events.emit('success', trans('components.image_delete_success'));