mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-29 10:17:15 +00:00
fix: Correct purchase call to use purchaseType, not identifier
This commit is contained in:
parent
384783567b
commit
420cebd93b
2 changed files with 2 additions and 3 deletions
|
|
@ -60,11 +60,10 @@ module.exports = function purchase (user, req = {}, analytics) {
|
|||
];
|
||||
}
|
||||
|
||||
let acceptedTypes = ['eggs', 'hatchingPotions', 'premiumHatchingPotions', 'food', 'quests', 'gear'];
|
||||
let acceptedTypes = ['eggs', 'hatchingPotions', 'food', 'quests', 'gear'];
|
||||
if (acceptedTypes.indexOf(type) === -1) {
|
||||
throw new NotFound(i18n.t('notAccteptedType', req.language));
|
||||
}
|
||||
if (type === 'premiumHatchingPotions') type = 'hatchingPotions';
|
||||
|
||||
if (type === 'gear') {
|
||||
item = content.gear.flat[key];
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
popover='{{item.notes}}', popover-append-to-body='true',
|
||||
popover-title!='{{item.text}}',
|
||||
popover-trigger='mouseenter', popover-placement='top',
|
||||
ng-click='purchase(category.identifier, item)')
|
||||
ng-click='purchase(item.purchaseType, item)')
|
||||
p {{item.value}}
|
||||
span.Pet_Currency_Gem1x.inline-gems(ng-if='item.currency === "gems"')
|
||||
span(class='shop_gold', ng-if='item.currency === "gold"')
|
||||
|
|
|
|||
Loading…
Reference in a new issue