mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Remove unused v2 code from /website/common/script (#8034)
* remove apiv2 behavior from ops * remove apiv2 behavior from fns
This commit is contained in:
committed by
Blade Barringer
parent
8f9ed6e377
commit
5f0c1687b5
@@ -1,15 +1,11 @@
|
||||
import _ from 'lodash';
|
||||
import autoAllocate from '../fns/autoAllocate';
|
||||
|
||||
module.exports = function allocateNow (user, req = {}) {
|
||||
module.exports = function allocateNow (user) {
|
||||
_.times(user.stats.points, () => autoAllocate(user));
|
||||
user.stats.points = 0;
|
||||
|
||||
if (req.v2 === true) {
|
||||
return _.pick(user, 'stats');
|
||||
} else {
|
||||
return [
|
||||
user.stats,
|
||||
];
|
||||
}
|
||||
return [
|
||||
user.stats,
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user