mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +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) {
|
if (acceptedTypes.indexOf(type) === -1) {
|
||||||
throw new NotFound(i18n.t('notAccteptedType', req.language));
|
throw new NotFound(i18n.t('notAccteptedType', req.language));
|
||||||
}
|
}
|
||||||
if (type === 'premiumHatchingPotions') type = 'hatchingPotions';
|
|
||||||
|
|
||||||
if (type === 'gear') {
|
if (type === 'gear') {
|
||||||
item = content.gear.flat[key];
|
item = content.gear.flat[key];
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
popover='{{item.notes}}', popover-append-to-body='true',
|
popover='{{item.notes}}', popover-append-to-body='true',
|
||||||
popover-title!='{{item.text}}',
|
popover-title!='{{item.text}}',
|
||||||
popover-trigger='mouseenter', popover-placement='top',
|
popover-trigger='mouseenter', popover-placement='top',
|
||||||
ng-click='purchase(category.identifier, item)')
|
ng-click='purchase(item.purchaseType, item)')
|
||||||
p {{item.value}}
|
p {{item.value}}
|
||||||
span.Pet_Currency_Gem1x.inline-gems(ng-if='item.currency === "gems"')
|
span.Pet_Currency_Gem1x.inline-gems(ng-if='item.currency === "gems"')
|
||||||
span(class='shop_gold', ng-if='item.currency === "gold"')
|
span(class='shop_gold', ng-if='item.currency === "gold"')
|
||||||
|
|||||||
Reference in New Issue
Block a user