Fixed bug which was exposing draft posts
This commit is contained in:
parent
fa9be69045
commit
7c08e1fbe0
|
|
@ -20,6 +20,10 @@ func (s *Publisher) postIter(ctx context.Context, site int64) iter.Seq[models.Ma
|
|||
|
||||
for {
|
||||
for _, post := range page {
|
||||
if post.State != models.StatePublished {
|
||||
continue
|
||||
}
|
||||
|
||||
if !yield(models.Maybe[*models.Post]{Value: post}) {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue