From 9f7d9171dcdf8e9370be77666be992d716fe7c82 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 18 Sep 2018 08:10:24 +0200 Subject: [PATCH] cleanup --- src/components/lists/EditList.vue | 59 +++++++------------------------ 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/src/components/lists/EditList.vue b/src/components/lists/EditList.vue index d17c99b9..451a4dc7 100644 --- a/src/components/lists/EditList.vue +++ b/src/components/lists/EditList.vue @@ -241,7 +241,6 @@ userToDelete: 0, listTeams: [], - teamIsAdmin: false, newTeam: {team_id: 0}, showTeamDeleteModal: false, teamToDelete: 0, @@ -278,18 +277,6 @@ this.handleError(e) }) }, - loadUsers() { - // Get all users with access to the list - HTTP.get(`lists/` + this.$route.params.id + `/users`, {headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')}}) - .then(response => { - response.data.push(this.list.owner) - this.$set(this, 'listUsers', response.data) - this.loading = false - }) - .catch(e => { - this.handleError(e) - }) - }, submit() { this.loading = true @@ -320,6 +307,18 @@ this.handleError(e) }) }, + loadUsers() { + // Get all users with access to the list + HTTP.get(`lists/` + this.$route.params.id + `/users`, {headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')}}) + .then(response => { + response.data.push(this.list.owner) + this.$set(this, 'listUsers', response.data) + this.loading = false + }) + .catch(e => { + this.handleError(e) + }) + }, deleteUser() { HTTP.delete(`lists/` + this.$route.params.id + `/users/` + this.userToDelete, {headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')}}) .then(() => { @@ -411,37 +410,3 @@ } } - - \ No newline at end of file