mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Don't allow includes to be specified
Relations must be set to include by default on the API instead
This commit is contained in:
parent
65feedc891
commit
ce5e4b6c0f
|
@ -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}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user