mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Enabled fetch members count on post only if members is enabled
This commit is contained in:
parent
44819d1fbf
commit
61972b01ce
1 changed files with 10 additions and 8 deletions
|
@ -543,6 +543,7 @@ export default Controller.extend({
|
||||||
|
|
||||||
// load supplementel data such as the actions list in the background
|
// load supplementel data such as the actions list in the background
|
||||||
backgroundLoader: task(function* () {
|
backgroundLoader: task(function* () {
|
||||||
|
if (this.feature.members) {
|
||||||
let actions = yield this.store.query('action', {
|
let actions = yield this.store.query('action', {
|
||||||
filter: `resource_type:post+resource_id:${this.post.id}+event:delivered`,
|
filter: `resource_type:post+resource_id:${this.post.id}+event:delivered`,
|
||||||
limit: 'all'
|
limit: 'all'
|
||||||
|
@ -551,6 +552,7 @@ export default Controller.extend({
|
||||||
|
|
||||||
let membersResponse = yield this.store.query('member', {limit: 1});
|
let membersResponse = yield this.store.query('member', {limit: 1});
|
||||||
this.set('memberCount', get(membersResponse, 'meta.pagination.total'));
|
this.set('memberCount', get(membersResponse, 'meta.pagination.total'));
|
||||||
|
}
|
||||||
}).restartable(),
|
}).restartable(),
|
||||||
|
|
||||||
/* Public methods --------------------------------------------------------*/
|
/* Public methods --------------------------------------------------------*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue