0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed members count in confirm email modal

no issue

- the members count used to disable the email toggle and shown in the confirm modal was incorrect as it didn't take into account subscribed vs non-subscribed members
- adjusts the filter in the count query to only fetch subscribed members
This commit is contained in:
Kevin Ansfield 2019-11-26 15:08:21 +00:00
parent 5674323d2a
commit 6aecfbfcce

View file

@ -547,7 +547,7 @@ export default Controller.extend({
// load supplementel data such as the members count in the background // load supplementel data such as the members count in the background
backgroundLoader: task(function* () { backgroundLoader: task(function* () {
if (this.feature.members) { if (this.feature.members) {
let membersResponse = yield this.store.query('member', {limit: 1}); let membersResponse = yield this.store.query('member', {limit: 1, filter: 'subscribed:true'});
this.set('memberCount', get(membersResponse, 'meta.pagination.total')); this.set('memberCount', get(membersResponse, 'meta.pagination.total'));
} }
}).restartable(), }).restartable(),