feat: add preUnpublish, postUnpublish events (#3196)

This commit is contained in:
Erez Rokah
2020-02-04 13:49:30 +02:00
committed by GitHub
parent 7d792f3005
commit 18e284ece8
6 changed files with 39 additions and 12 deletions

View File

@ -394,6 +394,16 @@ CMS.registerEventListener({
name: 'postPublish',
handler: ({ author, entry }) => console.log(JSON.stringify({ author, data: entry.get('data') })),
});
CMS.registerEventListener({
name: 'preUnpublish',
handler: ({ author, entry }) => console.log(JSON.stringify({ author, data: entry.get('data') })),
});
CMS.registerEventListener({
name: 'postUnpublish',
handler: ({ author, entry }) => console.log(JSON.stringify({ author, data: entry.get('data') })),
});
```
> Supported events are `prePublish` and `postPublish`
> Supported events are `prePublish`, `postPublish`, `preUnpublish` and `postUnpublish`