diff --git a/src/components/lists/EditList.vue b/src/components/lists/EditList.vue index d17c99b93..451a4dc72 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