v3 adapt v2: lint client only shared ops and enable members integration tests

This commit is contained in:
Matteo Pagliazzi
2016-04-07 11:54:36 +02:00
parent d49847688e
commit 2d3fbe9f13
13 changed files with 121 additions and 108 deletions

View File

@@ -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;
};