UX: Refresh group membership list when removing users or changing owners

This commit is contained in:
David Taylor 2020-03-17 11:06:17 +00:00
parent 12c29ae955
commit e72c0544b0
No known key found for this signature in database
GPG Key ID: 46904C18B1D3F434
1 changed files with 3 additions and 3 deletions

View File

@ -103,14 +103,14 @@ const Group = RestModel.extend({
return ajax(`/admin/groups/${this.id}/owners.json`, {
type: "DELETE",
data: { user_id: member.id }
}).then(() => this.findMembers());
}).then(() => this.findMembers({}, true));
},
removeMember(member, params) {
return ajax(`/groups/${this.id}/members.json`, {
type: "DELETE",
data: { user_id: member.id }
}).then(() => this.findMembers(params));
}).then(() => this.findMembers(params, true));
},
addMembers(usernames, filter) {
@ -134,7 +134,7 @@ const Group = RestModel.extend({
if (filter) {
this._filterMembers(response);
} else {
this.findMembers();
this.findMembers({}, true);
}
});
},