mirror of
https://github.com/flarum/framework.git
synced 2024-12-04 00:03:37 +08:00
Make discussion list includes extensible
This commit is contained in:
parent
6aa0765bb4
commit
a5f4e10f79
|
@ -25,7 +25,7 @@ export default class DiscussionList extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
params() {
|
params() {
|
||||||
var params = {};
|
var params = {include: ['startUser', 'lastUser']};
|
||||||
for (var i in this.props.params) {
|
for (var i in this.props.params) {
|
||||||
params[i] = this.props.params[i];
|
params[i] = this.props.params[i];
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ export default class DiscussionList extends Component {
|
||||||
loadResults(offset) {
|
loadResults(offset) {
|
||||||
var params = this.params();
|
var params = this.params();
|
||||||
params.page = {offset};
|
params.page = {offset};
|
||||||
|
params.include = params.include.join(',');
|
||||||
return app.store.find('discussions', params);
|
return app.store.find('discussions', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user