Skip to content

Commit

Permalink
Fix: For archive and under review too
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifycode authored and tuxpiper committed Jan 7, 2025
1 parent d2d6f06 commit bdd5535
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ export class PostHeadComponent extends BaseComponent implements OnInit {
underReview() {
this.postsService.updateStatus(this.post.id, PostStatus.Draft).subscribe((res) => {
this.post = res.result;
this.statusChanged.emit();
this.eventBusService.next({
type: EventType.StatusChange,
payload: this.post,
});
});
}

Expand Down Expand Up @@ -103,7 +106,10 @@ export class PostHeadComponent extends BaseComponent implements OnInit {
archive() {
this.postsService.updateStatus(this.post.id, PostStatus.Archived).subscribe((res) => {
this.post = res.result;
this.statusChanged.emit();
this.eventBusService.next({
type: EventType.StatusChange,
payload: this.post,
});
});
}

Expand Down

0 comments on commit bdd5535

Please sign in to comment.