fix(lint): or/and, import

This commit is contained in:
SabreCat
2023-08-07 21:33:31 -05:00
parent 1371b80635
commit 39477c6f11
3 changed files with 3 additions and 2 deletions

View File

@@ -267,7 +267,7 @@ api.joinChallenge = {
const group = await Group.getGroup({
user, groupId: challenge.group, fields: basicGroupFields, optionalMembership: true,
});
if (!group || group.type === 'party' && group._id !== user.party._id) {
if (!group || (group.type === 'party' && group._id !== user.party._id)) {
throw new NotFound(res.t('challengeNotFound'));
}
if (group.type === 'guild' && group._id !== TAVERN_ID && !group.hasActiveGroupPlan()) {

View File

@@ -412,7 +412,7 @@ api.getGroup = {
const { groupId } = req.params;
const group = await Group.getGroup({ user, groupId, populateLeader: false });
if (!group || group.type === 'guild' && group._id !== TAVERN_ID && !group.hasActiveGroupPlan()) {
if (!group || (group.type === 'guild' && group._id !== TAVERN_ID && !group.hasActiveGroupPlan())) {
throw new NotFound(res.t('groupNotFound'));
}

View File

@@ -8,6 +8,7 @@ import {
TAVERN_ID,
} from '../../models/group';
import {
BadRequest,
NotFound,
NotAuthorized,
} from '../errors';