mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
9 lines
316 B
JavaScript
9 lines
316 B
JavaScript
import _ from 'lodash';
|
|
|
|
module.exports = function(user, req, cb) {
|
|
_.merge(user.preferences.webhooks[req.params.id], req.body);
|
|
if (typeof user.markModified === "function") {
|
|
user.markModified('preferences.webhooks');
|
|
}
|
|
return typeof cb === "function" ? cb(null, user.preferences.webhooks) : void 0;
|
|
};
|