Fixed published posts count in publish flow

no issue

- the count fetch was including all posts rather than just published ones so it never matched the expected count
This commit is contained in:
Kevin Ansfield 2022-05-11 10:37:32 +01:00
parent ebcf4c7c16
commit e87e564462

View File

@ -67,7 +67,7 @@ export default class PublishModalComponent extends Component {
return;
}
const result = yield this.store.query('post', {limit: 1});
const result = yield this.store.query('post', {status: 'published', limit: 1});
let count = result.meta.pagination.total;
count += 1; // account for the new post