Skip to content

Commit

Permalink
fix sanity
Browse files Browse the repository at this point in the history
  • Loading branch information
negue committed Apr 15, 2018
1 parent 7ab446a commit 338e657
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions website/server/controllers/api-v3/quests.js
Expand Up @@ -18,7 +18,6 @@ import {
import common from '../../../common';
import { sendNotification as sendPushNotification } from '../../libs/pushNotifications';
import apiMessages from '../../libs/apiMessages';
import commonMessages from '../../../common/script/libs/commonMessages';

const questScrolls = common.content.quests;

Expand Down Expand Up @@ -71,7 +70,7 @@ api.inviteToQuest = {

if (!group) throw new NotFound(res.t('groupNotFound'));
if (group.type !== 'party') throw new NotAuthorized(res.t('guildQuestsNotSupported'));
if (!quest) throw new NotFound(commonMessages('questNotFound', { key: questKey }));
if (!quest) throw new NotFound(apiMessages('questNotFound', { key: questKey }));
if (!user.items.quests[questKey]) throw new NotAuthorized(res.t('questNotOwned'));
if (user.stats.lvl < quest.lvl) throw new NotAuthorized(res.t('questLevelTooHigh', { level: quest.lvl }));
if (group.quest.key) throw new NotAuthorized(res.t('questAlreadyUnderway'));
Expand Down

0 comments on commit 338e657

Please sign in to comment.