mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
11 lines
301 B
JavaScript
11 lines
301 B
JavaScript
import _ from 'lodash';
|
|
|
|
module.exports = function(user, req, cb) {
|
|
_.times(user.stats.points, user.fns.autoAllocate);
|
|
user.stats.points = 0;
|
|
if (typeof user.markModified === "function") {
|
|
user.markModified('stats');
|
|
}
|
|
return typeof cb === "function" ? cb(null, user.stats) : void 0;
|
|
};
|