mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Fixed published post count shown on publish complete step
no issue - API query was using `?status=published` instead of `?filter=status:published` so was counting all posts rather than just published ones
This commit is contained in:
parent
9019ae783c
commit
f2b9fa544f
1 changed files with 2 additions and 1 deletions
|
@ -73,10 +73,11 @@ export default class PublishModalComponent extends Component {
|
|||
|
||||
// no count is shown for pages, scheduled posts, or email-only posts
|
||||
if (publishOptions.post.isPage || publishOptions.isScheduled || !publishOptions.willPublish) {
|
||||
this.postCount = null;
|
||||
return;
|
||||
}
|
||||
|
||||
const result = yield this.store.query('post', {status: 'published', limit: 1});
|
||||
const result = yield this.store.query('post', {filter: 'status:published', limit: 1});
|
||||
let count = result.meta.pagination.total;
|
||||
|
||||
count += 1; // account for the new post
|
||||
|
|
Loading…
Add table
Reference in a new issue