mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 18:22:21 +00:00
fix(lint): or/and, import
This commit is contained in:
parent
1371b80635
commit
39477c6f11
3 changed files with 3 additions and 2 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {
|
|||
TAVERN_ID,
|
||||
} from '../../models/group';
|
||||
import {
|
||||
BadRequest,
|
||||
NotFound,
|
||||
NotAuthorized,
|
||||
} from '../errors';
|
||||
|
|
|
|||
Loading…
Reference in a new issue