fix(tests): new approach attempt

This commit is contained in:
SabreCat
2023-07-25 18:00:31 -05:00
parent 26f5ef093f
commit d394858022
3 changed files with 21 additions and 14 deletions

View File

@@ -126,7 +126,11 @@ api.createGroup = {
if (validationErrors) throw validationErrors;
if (group.type === 'guild') {
throw new BadRequest(res.t('featureRetired'));
if (!user.hasPermission('fullAccess')) {
throw new BadRequest(res.t('featureRetired'));
}
group.balance = 1;
user.guilds.push(group._id);
} else {
if (group.privacy !== 'private') throw new NotAuthorized(res.t('partyMustbePrivate'));
if (user.party._id) throw new NotAuthorized(res.t('messageGroupAlreadyInParty'));