Updates a group.
When a public or private group's name is updated, the slug is updated to reflect the new group name. Only group admins can update their group.
Notes:
group.privacyStatus
is updated from PRIVATE
to PUBLIC
, all pending group join requests are automatically approved.group.privacyStatus
is updated from PRIVATE
to SECRET
, all pending group join requests are automatically rejected.function updateGroup(
_id: string,
group: UpdateGroup,
options: UpdateGroupOptions,
): Promise<Group>;
Group ID.
import { groups } from "wix-groups.v2";
async function updateGroup(id, group, options) {
try {
const result = await groups.updateGroup(id, group, options);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.