mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
fix: Correct purchase call to use purchaseType, not identifier
This commit is contained in:
@@ -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"')
|
||||
|
||||
Reference in New Issue
Block a user