mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
* Reorganized stats * Organized allocation common code * Added bulk allocate to common * Added allocate bulk route * Fixed structure and lint * Fixed import and apidoc
12 lines
248 B
JavaScript
12 lines
248 B
JavaScript
import times from 'lodash/times';
|
|
import autoAllocate from '../../fns/autoAllocate';
|
|
|
|
module.exports = function allocateNow (user) {
|
|
times(user.stats.points, () => autoAllocate(user));
|
|
user.stats.points = 0;
|
|
|
|
return [
|
|
user.stats,
|
|
];
|
|
};
|