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