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 1b8805deb3
commit 4bcd016e88
1 changed files with 1 additions and 1 deletions

View File

@ -547,7 +547,7 @@ export default Controller.extend({
// load supplementel data such as the members count in the background
backgroundLoader: task(function* () {
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'));
}
}).restartable(),