mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 05:07:22 +01:00
WIP(customizations): revised backgrounds modal
This commit is contained in:
@@ -224,7 +224,7 @@ export default async function unlock (user, req = {}, analytics) {
|
||||
// The passed paths are not used anymore after this point for full sets
|
||||
const { set, items, paths } = getSet(setType, firstPath, req);
|
||||
|
||||
if (isBackground) {
|
||||
if (isBackground && !alreadyUnlocked(user, setType, path)) {
|
||||
const matchers = getScheduleMatchingGroup('backgrounds');
|
||||
if (!matchers.match(set.key)) {
|
||||
throw new NotAuthorized(i18n.t('notAvailable', req.language));
|
||||
|
||||
Reference in New Issue
Block a user