mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
wip: split shared ops
This commit is contained in:
9
common/script/ops/update.js
Normal file
9
common/script/ops/update.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
module.exports = function (user, req, cb) {
|
||||
_.each(req.body, function (v, k) {
|
||||
user.fns.dotSet(k, v);
|
||||
return true;
|
||||
});
|
||||
return typeof cb === 'function' ? cb(null, user) : void 0;
|
||||
};
|
||||
Reference in New Issue
Block a user