mirror of
https://github.com/flarum/core.git
synced 2025-07-13 04:46:24 +02: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:
@ -144,8 +144,7 @@ export default class DiscussionPage extends mixin(Component, evented) {
|
|||||||
// before stuff is drawn to the page.
|
// before stuff is drawn to the page.
|
||||||
setTimeout(this.init.bind(this, preloadedDiscussion));
|
setTimeout(this.init.bind(this, preloadedDiscussion));
|
||||||
} else {
|
} else {
|
||||||
const params = this.params();
|
const params = this.requestParams();
|
||||||
params.include = params.include.join(',');
|
|
||||||
|
|
||||||
app.store.find('discussions', m.route.param('id'), params)
|
app.store.find('discussions', m.route.param('id'), params)
|
||||||
.then(this.init.bind(this));
|
.then(this.init.bind(this));
|
||||||
@ -165,10 +164,9 @@ export default class DiscussionPage extends mixin(Component, evented) {
|
|||||||
*
|
*
|
||||||
* @return {Object}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
params() {
|
requestParams() {
|
||||||
return {
|
return {
|
||||||
page: {near: this.near},
|
page: {near: this.near}
|
||||||
include: ['posts', 'posts.user', 'posts.user.groups']
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user