mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 14:43:08 +03:00
Fixed member count for limit checks when publishing sometimes being incorrect (#16667)
no issue - the members stats service was being used for the total member count when checking member limits for publishing but the stats service is not always correct which could result in publishing being blocked unexpectedly - switched to using the total count from a `/members/` query which should always be correct/match other counts within the UI
This commit is contained in:
parent
2738d25cc6
commit
59c6f9d28a
@ -93,9 +93,10 @@ export default class LimitsService extends Service {
|
||||
}
|
||||
|
||||
async getMembersCount() {
|
||||
const counts = await this.membersStats.fetchCounts();
|
||||
const members = await this.store.query('member', {limit: 'all'});
|
||||
const total = members.meta.pagination.total;
|
||||
|
||||
return counts.total;
|
||||
return total;
|
||||
}
|
||||
|
||||
async getNewslettersCount() {
|
||||
|
Loading…
Reference in New Issue
Block a user