diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-05-24 15:45:57 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-05-24 17:52:15 +0200 |
commit | cd73cd3a6e2c3623efbd274ceacc44c2d210b049 (patch) | |
tree | 677ead0035f10c7343108159ef856ba722221113 /settings/src/components/userList/userRow.vue | |
parent | f5d0f140456ead25e0e8142d2c17d6d720bf4418 (diff) | |
download | nextcloud-server-cd73cd3a6e2c3623efbd274ceacc44c2d210b049.tar.gz nextcloud-server-cd73cd3a6e2c3623efbd274ceacc44c2d210b049.zip |
Fixed error throw and disablign count group update
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'settings/src/components/userList/userRow.vue')
-rw-r--r-- | settings/src/components/userList/userRow.vue | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/settings/src/components/userList/userRow.vue b/settings/src/components/userList/userRow.vue index bcdb4ba0042..67a2582fc11 100644 --- a/settings/src/components/userList/userRow.vue +++ b/settings/src/components/userList/userRow.vue @@ -326,18 +326,22 @@ export default { }, /** - * Create a new group + * Create a new group and add user to it * * @param {string} groups Group id * @returns {Promise} */ createGroup(gid) { this.loading = {groups:true, subadmins:true} - this.$store.dispatch('addGroup', gid).then(() => { - this.loading = {groups:false, subadmins:false}; - let userid = this.user.id; - this.$store.dispatch('addUserGroup', {userid, gid}); - }); + this.$store.dispatch('addGroup', gid) + .then(() => { + this.loading = {groups:false, subadmins:false}; + let userid = this.user.id; + this.$store.dispatch('addUserGroup', {userid, gid}); + }) + .catch(() => { + this.loading = {groups:false, subadmins:false}; + }); return this.$store.getters.getGroups[this.groups.length]; }, @@ -372,6 +376,9 @@ export default { if (this.$route.params.selectedGroup === gid) { this.$store.commit('deleteUser', userid); } + }) + .catch(() => { + this.loading.groups = false }); }, |