fix(content): item type handling

This commit is contained in:
Sabe Jones
2016-08-10 05:18:30 +00:00
parent 0d1bff5dda
commit 64c8e4d16d
4 changed files with 5 additions and 3 deletions

View File

@@ -60,10 +60,11 @@ module.exports = function purchase (user, req = {}, analytics) {
];
}
let acceptedTypes = ['eggs', 'hatchingPotions', 'food', 'quests', 'gear'];
let acceptedTypes = ['eggs', 'hatchingPotions', 'premiumHatchingPotions', '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];