mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Add avatar customizations to content API
This commit is contained in:
committed by
Blade Barringer
parent
0d06d765f2
commit
8e8c28725a
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user