mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
19 lines
343 B
Markdown
19 lines
343 B
Markdown
|
# Member Events
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
```
|
||
|
const {MemberEntryViewEvent} = require('@tryghost/member-events');
|
||
|
|
||
|
const event = MemberEntryViewEvent.create({
|
||
|
memberId: member.id,
|
||
|
memberStatus: member.status,
|
||
|
entryId: post.id,
|
||
|
entryUrl: post.url
|
||
|
});
|
||
|
|
||
|
const DomainEvents = require('@tryghost/domain-events');
|
||
|
|
||
|
DomainEvents.dispatch(event);
|
||
|
```
|