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