From 840034a0e587993f90ae1d104a7f1411ba6dcdb3 Mon Sep 17 00:00:00 2001 From: Nicolas Widart Date: Mon, 11 Sep 2017 13:55:05 +0200 Subject: [PATCH] Using ES6 syntax everywhere --- Modules/Core/Assets/js/components/DeleteComponent.vue | 4 ++-- Modules/Page/Assets/js/components/PageTable.vue | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/Core/Assets/js/components/DeleteComponent.vue b/Modules/Core/Assets/js/components/DeleteComponent.vue index 485c02c9d..297e78363 100644 --- a/Modules/Core/Assets/js/components/DeleteComponent.vue +++ b/Modules/Core/Assets/js/components/DeleteComponent.vue @@ -19,7 +19,7 @@ }).then(() => { let vm = this; axios.delete(this.scope.row.urls.delete_url) - .then(function (response) { + .then(response => { if (response.data.errors === false) { vm.$message({ type: 'success', @@ -29,7 +29,7 @@ vm.rows.splice(vm.scope.$index, 1); } }) - .catch(function (error) { + .catch(error => { vm.$message({ type: 'error', message: response.data.message diff --git a/Modules/Page/Assets/js/components/PageTable.vue b/Modules/Page/Assets/js/components/PageTable.vue index ca4cada14..1ad05bed7 100644 --- a/Modules/Page/Assets/js/components/PageTable.vue +++ b/Modules/Page/Assets/js/components/PageTable.vue @@ -30,16 +30,16 @@ } }, methods: { - fetchData: function () { + fetchData() { let vm = this; axios.get(route('api.page.page.index')) - .then(function (response) { + .then(response => { vm.data = response.data.data; }) - .catch(function (response) { + .catch(response => { }); }, - goToEdit: function (scope) { + goToEdit(scope) { window.location = scope.row.urls.edit_url; } },