mirror of
https://github.com/flarum/core.git
synced 2025-07-23 17:51:24 +02:00
Roughly implement routes and data preloading
Only preloading data for basic requests w/o query params, at least for the moment - if we have to preload for something like /?q=test&sort=newest, we end up having to duplicate a whole lot of logic between JS/PHP.
This commit is contained in:
@@ -100,7 +100,7 @@ class IndexAction extends SerializeCollectionAction
|
||||
static::addPaginationLinks(
|
||||
$document,
|
||||
$request,
|
||||
$this->url->toRoute('flarum.api.discussions.index'),
|
||||
$request->http ? $this->url->toRoute('flarum.api.discussions.index') : '',
|
||||
$results->areMoreResults()
|
||||
);
|
||||
|
||||
|
@@ -32,8 +32,8 @@ class ShowAction extends SerializeResourceAction
|
||||
public static $include = [
|
||||
'startUser' => false,
|
||||
'lastUser' => false,
|
||||
'startPost' => true,
|
||||
'lastPost' => true,
|
||||
'startPost' => false,
|
||||
'lastPost' => false,
|
||||
'posts' => true,
|
||||
'posts.user' => true,
|
||||
'posts.user.groups' => true,
|
||||
|
Reference in New Issue
Block a user