Fix reloading the members list after excluding a member

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-03-31 10:06:36 +02:00
parent 356f69cef2
commit 569a4b6356
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -376,6 +376,12 @@ export default class GroupMembers extends mixins(GroupMixin) {
async removeMember(memberId: string): Promise<void> { async removeMember(memberId: string): Promise<void> {
const { roles, MEMBERS_PER_PAGE, group, page } = this; const { roles, MEMBERS_PER_PAGE, group, page } = this;
const variables = {
name: usernameWithDomain(group),
page,
limit: MEMBERS_PER_PAGE,
roles,
};
try { try {
await this.$apollo.mutate<{ removeMember: IMember }>({ await this.$apollo.mutate<{ removeMember: IMember }>({
mutation: REMOVE_MEMBER, mutation: REMOVE_MEMBER,
@ -386,14 +392,7 @@ export default class GroupMembers extends mixins(GroupMixin) {
refetchQueries: [ refetchQueries: [
{ {
query: GROUP_MEMBERS, query: GROUP_MEMBERS,
variables() { variables,
return {
name: usernameWithDomain(group),
page,
limit: MEMBERS_PER_PAGE,
roles,
};
},
}, },
], ],
}); });