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:
@@ -89,8 +89,14 @@ module.exports = function feed (user, req = {}) {
|
||||
|
||||
user.items.food[food.key]--;
|
||||
|
||||
return {
|
||||
data: userPets[pet],
|
||||
message,
|
||||
};
|
||||
if (req.v2 === true) {
|
||||
return {
|
||||
value: userPets[pet],
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
data: userPets[pet],
|
||||
message,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user