Ghost/ghost/post-events/src/PostDeletedEvent.ts
Naz 99f29a169c Removed post delete related event handling
closes https://github.com/TryGhost/Arch/issues/91

- We have on cascade delete (a9f9f6121a/ghost/core/core/server/data/schema/schema.js (L1068)) on `post_id` column which handles post deletion logic automatically on DB level.
- The commented out handlers in the long term should be hooked up with public CollectionService methods on the client side.
2023-09-15 13:50:25 +08:00

18 lines
496 B
TypeScript

export class PostDeletedEvent {
id: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
data: any;
timestamp: Date;
constructor(data: PostDeletedEvent, timestamp: Date) {
this.id = data.id;
this.data = data.data;
this.timestamp = timestamp;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
static create(data: any, timestamp = new Date()) {
return new PostDeletedEvent(data, timestamp);
}
}