updateGroupExtension = async (req, res, next) => {
  try {
    const groupname = req.params.groupname;
    const extensionData = req.body.extension;
    const groupInfo = await groupModel.getGroup(groupname);
    for (const [key, value] of Object.entries(extensionData)) {
      groupInfo.extension[key] = value;
    }
    await groupModel.updateGroup(groupname, groupInfo);
    return res.status(201).json({
      message: 'update group extension data successfully.',
    });
  } catch (error) {
    return next(createError.unknown(error));
  }
}
Legacy function and will be deprecated in the future. Please use updateGroup.