mirror of https://github.com/halo-dev/halo
fix: batch publishing does not refresh private status (#1821)
parent
09f1f4d9db
commit
63e8cd0cd5
|
@ -206,6 +206,14 @@ public class PostServiceImpl extends BasePostServiceImpl<Post> implements PostSe
|
|||
return updatedPost;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Post updateStatus(PostStatus status, Integer postId) {
|
||||
Post post = super.updateStatus(status, postId);
|
||||
eventPublisher.publishEvent(new PostUpdatedEvent(this, post));
|
||||
return post;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Post getBy(PostStatus status, String slug) {
|
||||
return super.getBy(status, slug);
|
||||
|
|
Loading…
Reference in New Issue