mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 02:10:09 +08:00
Use new discussion request include API
This commit is contained in:
parent
bbe863d401
commit
32efe11986
3
extensions/tags/js/bootstrap.js
vendored
3
extensions/tags/js/bootstrap.js
vendored
|
@ -25,7 +25,6 @@ import categoryLabel from 'categories/helpers/category-label';
|
|||
import categoryIcon from 'categories/helpers/category-icon';
|
||||
|
||||
app.initializers.add('categories', function() {
|
||||
|
||||
// Register routes.
|
||||
app.routes['categories'] = ['/categories', CategoriesPage.component()];
|
||||
app.routes['category'] = ['/c/:categories', IndexPage.component()];
|
||||
|
@ -117,7 +116,7 @@ app.initializers.add('categories', function() {
|
|||
|
||||
// Include a discussion's category when fetching it.
|
||||
extend(DiscussionPage.prototype, 'params', function(params) {
|
||||
params.include += ',category';
|
||||
params.include.push('category');
|
||||
});
|
||||
|
||||
// Restyle a discussion's hero to use its category color.
|
||||
|
|
Loading…
Reference in New Issue
Block a user