From 41c3276e66beed584ff5aabc3928ca8172cad46d Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Thu, 11 Feb 2016 15:36:21 +0100 Subject: [PATCH] fetch leader id when cancelling quest --- website/src/controllers/api-v3/quests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/controllers/api-v3/quests.js b/website/src/controllers/api-v3/quests.js index 4cfad3155c..fc1555f54d 100644 --- a/website/src/controllers/api-v3/quests.js +++ b/website/src/controllers/api-v3/quests.js @@ -208,7 +208,7 @@ api.cancelQuest = { let validationErrors = req.validationErrors(); if (validationErrors) throw validationErrors; - let group = await Group.getGroup({user, groupId, fields: 'type quest'}); + let group = await Group.getGroup({user, groupId, fields: 'type leader quest'}); if (!group) throw new NotFound(res.t('groupNotFound')); if (group.type !== 'party') throw new NotAuthorized(res.t('guildQuestsNotSupported')); if (!group.quest.key) throw new NotFound(res.t('questInvitationDoesNotExist'));