From fc6aee8373b09616cadb073286d6f3f451ded7a2 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 28 Nov 2018 10:11:26 +0100 Subject: [PATCH] changed cancel() to be called before handle error --- src/components/lists/EditList.vue | 8 ++++---- src/components/lists/NewList.vue | 4 ++-- src/components/lists/ShowList.vue | 16 ++++++++-------- src/components/namespaces/EditNamespace.vue | 12 ++++++------ src/components/namespaces/NewNamespace.vue | 4 ++-- src/components/sharing/team.vue | 8 ++++---- src/components/sharing/user.vue | 10 +++++----- src/components/teams/EditTeam.vue | 6 +++--- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/components/lists/EditList.vue b/src/components/lists/EditList.vue index 7801c6938..f504ff04a 100644 --- a/src/components/lists/EditList.vue +++ b/src/components/lists/EditList.vue @@ -129,8 +129,8 @@ cancel() }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, deleteList() { @@ -142,8 +142,8 @@ router.push({name: 'home'}) }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, handleError(e) { diff --git a/src/components/lists/NewList.vue b/src/components/lists/NewList.vue index 0d2bb3d7f..62288de76 100644 --- a/src/components/lists/NewList.vue +++ b/src/components/lists/NewList.vue @@ -54,8 +54,8 @@ cancel() }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, handleError(e) { diff --git a/src/components/lists/ShowList.vue b/src/components/lists/ShowList.vue index 3e45cb1fd..98760b1c4 100644 --- a/src/components/lists/ShowList.vue +++ b/src/components/lists/ShowList.vue @@ -216,8 +216,8 @@ cancel() // cancel the timer }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, addTask() { @@ -230,8 +230,8 @@ cancel() // cancel the timer }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) this.newTask = '' @@ -246,8 +246,8 @@ cancel() // To not set the spinner to loading when the request is made in less than 100ms, would lead to loading infinitly. }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, editTask(id) { @@ -341,8 +341,8 @@ cancel() // cancel the timers }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, updateTaskByID(id, updatedTask) { diff --git a/src/components/namespaces/EditNamespace.vue b/src/components/namespaces/EditNamespace.vue index ff241f00c..507bd3988 100644 --- a/src/components/namespaces/EditNamespace.vue +++ b/src/components/namespaces/EditNamespace.vue @@ -108,8 +108,8 @@ cancel() }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, submit() { @@ -128,8 +128,8 @@ cancel() }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, deleteNamespace() { @@ -141,8 +141,8 @@ router.push({name: 'home'}) }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, handleError(e) { diff --git a/src/components/namespaces/NewNamespace.vue b/src/components/namespaces/NewNamespace.vue index abc699334..7e5b18fd8 100644 --- a/src/components/namespaces/NewNamespace.vue +++ b/src/components/namespaces/NewNamespace.vue @@ -54,8 +54,8 @@ cancel() }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, handleError(e) { diff --git a/src/components/sharing/team.vue b/src/components/sharing/team.vue index 6b43370f8..93f008c57 100644 --- a/src/components/sharing/team.vue +++ b/src/components/sharing/team.vue @@ -128,8 +128,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, deleteTeam() { @@ -142,8 +142,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, addTeam(admin) { @@ -163,8 +163,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, toggleTeamType(teamid, current) { @@ -181,8 +181,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, handleError(e) { diff --git a/src/components/sharing/user.vue b/src/components/sharing/user.vue index 8fc5ca30b..3405c958d 100644 --- a/src/components/sharing/user.vue +++ b/src/components/sharing/user.vue @@ -150,8 +150,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, deleteUser() { @@ -164,8 +164,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, addUser(admin) { @@ -188,8 +188,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, toggleUserType(userid, current) { @@ -206,8 +206,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, findUsers(query) { @@ -234,8 +234,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, clearAll () { diff --git a/src/components/teams/EditTeam.vue b/src/components/teams/EditTeam.vue index 02aa3f150..4de67b58f 100644 --- a/src/components/teams/EditTeam.vue +++ b/src/components/teams/EditTeam.vue @@ -203,8 +203,8 @@ cancel() }) .catch(e => { - this.handleError(e) - cancel() + cancel() + this.handleError(e) }) }, deleteTeam() { @@ -246,8 +246,8 @@ cancel() }) .catch(e => { - this.handleError(e) cancel() + this.handleError(e) }) }, toggleUserType(userid, current) {