@enso-ui/how-to 4.0.13 → 4.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/how-to",
3
- "version": "4.0.13",
3
+ "version": "4.0.14",
4
4
  "description": "Basic how-to package",
5
5
  "main": "src/bulma/pages/howTo/Index.vue",
6
6
  "scripts": {
@@ -201,7 +201,7 @@ export default {
201
201
 
202
202
  components: { Fa, Fade, HowToVideo, Uploader, },
203
203
 
204
- inject: ['canAccess', 'errorHandler', 'i18n', 'route', 'toastr'],
204
+ inject: ['canAccess', 'errorHandler', 'http', 'i18n', 'route', 'toastr'],
205
205
 
206
206
  data: () => ({
207
207
  videos: [],
@@ -265,12 +265,12 @@ export default {
265
265
 
266
266
  methods: {
267
267
  getVideos() {
268
- axios.get(this.route('howTo.videos.index'))
268
+ this.http.get(this.route('howTo.videos.index'))
269
269
  .then(({ data }) => (this.videos = data))
270
270
  .catch(this.errorHandler);
271
271
  },
272
272
  getTags() {
273
- axios.get(this.route('howTo.tags.index'))
273
+ this.http.get(this.route('howTo.tags.index'))
274
274
  .then(({ data }) => (this.tags = data))
275
275
  .catch(this.errorHandler);
276
276
  },
@@ -305,26 +305,26 @@ export default {
305
305
  return;
306
306
  }
307
307
 
308
- axios.post(this.route('howTo.tags.store'), { name: this.query })
308
+ this.http.post(this.route('howTo.tags.store'), { name: this.query })
309
309
  .then(({ data }) => {
310
310
  this.tags.push(data);
311
311
  this.query = '';
312
312
  }).catch(this.errorHandler);
313
313
  },
314
314
  updateTag() {
315
- axios.patch(this.route('howTo.tags.update', this.selectedTag.id), {
315
+ this.http.patch(this.route('howTo.tags.update', this.selectedTag.id), {
316
316
  name: this.selectedTag.name,
317
317
  }).catch(this.errorHandler);
318
318
  },
319
319
  deleteTag(tagId) {
320
- axios.delete(this.route('howTo.tags.destroy', tagId))
320
+ this.http.delete(this.route('howTo.tags.destroy', tagId))
321
321
  .then(() => {
322
322
  const index = this.tags.findIndex(({ id }) => id === tagId);
323
323
  this.tags.splice(index, 1);
324
324
  }).catch(this.errorHandler);
325
325
  },
326
326
  update() {
327
- axios.patch(this.route('howTo.videos.update', this.video.id), this.video)
327
+ this.http.patch(this.route('howTo.videos.update', this.video.id), this.video)
328
328
  .then(({ data }) => {
329
329
  this.toastr.success(data.message);
330
330
  this.reset();
@@ -124,7 +124,7 @@ export default {
124
124
  VideoPlayer,
125
125
  },
126
126
 
127
- inject: ['canAccess', 'errorHandler', 'i18n', 'route', 'toastr'],
127
+ inject: ['canAccess', 'errorHandler', 'http', 'i18n', 'route', 'toastr'],
128
128
 
129
129
  props: {
130
130
  video: {
@@ -166,14 +166,14 @@ export default {
166
166
  };
167
167
  },
168
168
  destroyPoster() {
169
- axios.delete(this.route('howTo.posters.destroy', this.video.poster.id))
169
+ this.http.delete(this.route('howTo.posters.destroy', this.video.poster.id))
170
170
  .then(({ data }) => {
171
171
  this.toastr.success(data.message);
172
172
  this.video.poster = null;
173
173
  }).catch(this.errorHandler);
174
174
  },
175
175
  destroyVideo() {
176
- axios.delete(this.route('howTo.videos.destroy', this.video.id))
176
+ this.http.delete(this.route('howTo.videos.destroy', this.video.id))
177
177
  .then(({ data }) => {
178
178
  this.toastr.success(data.message);
179
179
  this.$emit('delete');