fix: Correct purchase call to use purchaseType, not identifier

This commit is contained in:
Blade Barringer
2016-08-10 08:58:01 -05:00
parent 384783567b
commit 420cebd93b
2 changed files with 2 additions and 3 deletions

View File

@@ -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];

View File

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