From ce5e4b6c0fe1f5b2687cb9510db4a016e48c4968 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 --- js/forum/src/components/DiscussionPage.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/forum/src/components/DiscussionPage.js b/js/forum/src/components/DiscussionPage.js index dfd622808..f218615a3 100644 --- a/js/forum/src/components/DiscussionPage.js +++ b/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} }; }