mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
✨ Added member.edited
webhook
no issue - member model emits a `member.edited` event on update - webhooks service listens for `member.edited` event and will trigger any registered hooks
This commit is contained in:
parent
a339a838b3
commit
6b420d0cbd
2 changed files with 7 additions and 0 deletions
|
@ -14,6 +14,12 @@ const Member = ghostBookshelf.Model.extend({
|
|||
model.emitChange('added', options);
|
||||
},
|
||||
|
||||
onUpdated: function onUpdated(model, attrs, options) {
|
||||
ghostBookshelf.Model.prototype.onUpdated.apply(this, arguments);
|
||||
|
||||
model.emitChange('edited', options);
|
||||
},
|
||||
|
||||
onDestroyed: function onDestroyed(model, options) {
|
||||
ghostBookshelf.Model.prototype.onDestroyed.apply(this, arguments);
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ const WEBHOOKS = [
|
|||
|
||||
'member.added',
|
||||
'member.deleted',
|
||||
'member.edited',
|
||||
|
||||
'post.tag.attached',
|
||||
'post.tag.detached',
|
||||
|
|
Loading…
Add table
Reference in a new issue