fetch leader id when cancelling quest

This commit is contained in:
Matteo Pagliazzi
2016-02-11 15:36:21 +01:00
parent dfb6ec2f48
commit 41c3276e66

View File

@@ -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'));