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:
@@ -124,5 +124,9 @@ module.exports = function purchase (user, req = {}, analytics) {
|
||||
message: i18n.t('purchased', {type, key}),
|
||||
};
|
||||
|
||||
return response;
|
||||
if (req.v2 === true) {
|
||||
return response.data;
|
||||
} else {
|
||||
return response;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user