mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
v3 adapt v2: adapt common ops
This commit is contained in:
@@ -43,8 +43,13 @@ module.exports = function buyMysterySet (user, req = {}, analytics) {
|
||||
|
||||
user.purchased.plan.consecutive.trinkets--;
|
||||
|
||||
return {
|
||||
data: pickDeep(user, splitWhitespace('items purchased.plan.consecutive')),
|
||||
message: i18n.t('hourglassPurchaseSet', req.language),
|
||||
};
|
||||
|
||||
if (req.v2 === true) {
|
||||
return pickDeep(user, splitWhitespace('items purchased.plan.consecutive'));
|
||||
} else {
|
||||
return {
|
||||
data: pickDeep(user, splitWhitespace('items purchased.plan.consecutive')),
|
||||
message: i18n.t('hourglassPurchaseSet', req.language),
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user