Hey everyone.
The “members.listGroupMembers” only returns a max of 100 items. The below works with the wixAuth.elevate function. However, I want to return the whole list so I can check each item to see if the current memberId is an admin of the group. Does anyone know how to apply concat to this?
or alternatively, another way of finding out this info.
export async function checkIfAdmin(memberId, slug) {
const idOfGroup = await getIdOfGroupBySlug(slug);
let groupId = idOfGroup.groupId;
const listGroupMembers = wixAuth.elevate(members.listGroupMembers);
try {
const result = await listGroupMembers(groupId);
return result; // need to concat this to return all members if over 100
// after concat, I will apply logic here to test array for member and Admin status
} catch (error) {
console.error(error);
}
}
Thanks in advance!