@@ -1,10 +1,7 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
module.exports = function deleteWebhook (user, req) {
|
||||
delete user.preferences.webhooks[_.get(req, 'params.id')];
|
||||
user.markModified('preferences.webhooks');
|
||||
|
||||
return [
|
||||
user.preferences.webhooks,
|
||||
];
|
||||
module.exports = function(user, req, cb) {
|
||||
delete user.preferences.webhooks[req.params.id];
|
||||
if (typeof user.markModified === "function") {
|
||||
user.markModified('preferences.webhooks');
|
||||
}
|
||||
return typeof cb === "function" ? cb(null, user.preferences.webhooks) : void 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user