Add avatar customizations to content API

This commit is contained in:
Phillip Thelen
2016-01-21 14:24:10 +01:00
committed by Blade Barringer
parent 0d06d765f2
commit 8e8c28725a
18 changed files with 583 additions and 350 deletions

View File

@@ -319,9 +319,9 @@ let requiresPurchase = {
let checkPreferencePurchase = (user, path, item) => {
let itemPath = `${path}.${item}`;
let isDefaultPreference = _.get(shared.content.defaultAppearancePreferences, itemPath);
if (isDefaultPreference) return true;
let appearance = _.get(shared.content.appearances, itemPath)
if (!appearance) return false;
if (appearance.price === 0) return true;
return _.get(user.purchased, itemPath);
};