From f9c999624f9d246fb002e65af336b2dd58f47f83 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 23 Jul 2015 14:31:46 +0930 Subject: [PATCH] Don't allow includes to be specified Relations must be set to include by default on the API instead --- framework/core/js/forum/src/components/DiscussionPage.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/framework/core/js/forum/src/components/DiscussionPage.js b/framework/core/js/forum/src/components/DiscussionPage.js index dfd622808..f218615a3 100644 --- a/framework/core/js/forum/src/components/DiscussionPage.js +++ b/framework/core/js/forum/src/components/DiscussionPage.js @@ -144,8 +144,7 @@ export default class DiscussionPage extends mixin(Component, evented) { // before stuff is drawn to the page. setTimeout(this.init.bind(this, preloadedDiscussion)); } else { - const params = this.params(); - params.include = params.include.join(','); + const params = this.requestParams(); app.store.find('discussions', m.route.param('id'), params) .then(this.init.bind(this)); @@ -165,10 +164,9 @@ export default class DiscussionPage extends mixin(Component, evented) { * * @return {Object} */ - params() { + requestParams() { return { - page: {near: this.near}, - include: ['posts', 'posts.user', 'posts.user.groups'] + page: {near: this.near} }; }