mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
Add 'questOwner' to the return data of a 'questActivity' webhook. (#13277)
* Update webhook.js Add `questOwner: group.quest.leader,` to webhook.js * Update POST-groups_groupId_quests_invite.test.js Test if questOwner contains the correct data * Update POST-groups_groupId_quests_invite.test.js * Update webhooks.test.js
This commit is contained in:
parent
9e655d70d2
commit
1037510c9d
3 changed files with 4 additions and 0 deletions
|
|
@ -656,9 +656,11 @@ describe('webhooks', () => {
|
|||
id: 'group-id',
|
||||
name: 'some group',
|
||||
otherData: 'foo',
|
||||
quest: {},
|
||||
},
|
||||
quest: {
|
||||
key: 'some-key',
|
||||
questOwner: 'user-id',
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -263,6 +263,7 @@ describe('POST /groups/:groupId/quests/invite/:questKey', () => {
|
|||
expect(body.group.id).to.eql(questingGroup.id);
|
||||
expect(body.group.name).to.eql(questingGroup.name);
|
||||
expect(body.quest.key).to.eql(PET_QUEST);
|
||||
expect(body.quest.questOwner).to.eql(questingGroup.leader._id);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@ export const questActivityWebhook = new WebhookSender({
|
|||
},
|
||||
quest: {
|
||||
key: quest.key,
|
||||
questOwner: group.quest.leader,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue