Implement new schedule system for seasonal shop
This commit is contained in:
committed by
Sabe Jones
parent
736ef16430
commit
db4bec37e3
@@ -106,6 +106,12 @@ export default async function purchase (user, req = {}, analytics) {
|
||||
if (!matchers.match(item.key)) {
|
||||
throw new NotAuthorized(i18n.t('messageNotAvailable', req.language));
|
||||
}
|
||||
} else if (item.event && item.event.gear) {
|
||||
const matchers = getScheduleMatchingGroup('seasonalGear');
|
||||
console.log(matchers);
|
||||
if (!matchers.match(item.set)) {
|
||||
throw new NotAuthorized(i18n.t('messageNotAvailable', req.language));
|
||||
}
|
||||
} else if (!item.canBuy(user)) {
|
||||
throw new NotAuthorized(i18n.t('messageNotAvailable', req.language));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user