mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
v3 adapt v2: lint client only shared ops and enable members integration tests
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
module.exports = function(user, req, cb) {
|
||||
_.each(req.body, function(v, k) {
|
||||
user.fns.dotSet(k, v);
|
||||
return true;
|
||||
// TODO used only in client, move there?
|
||||
|
||||
module.exports = function updateUser (user, req = {}) {
|
||||
_.each(req.body, (val, key) => {
|
||||
_.set(user, key, val);
|
||||
});
|
||||
return typeof cb === "function" ? cb(null, user) : void 0;
|
||||
|
||||
return user;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user