Files
habitica/common/script/ops/allocateNow.js
2016-03-20 20:21:15 +01:00

11 lines
253 B
JavaScript

import _ from 'lodash';
import autoAllocate from '../fns/autoAllocate';
module.exports = function allocateNow (user) {
_.times(user.stats.points, () => autoAllocate(user));
user.stats.points = 0;
return {
data: _.pick(user, 'stats'),
};
};