1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 07:54:25 +02:00

Add pagination links to JSON-API index actions

This commit is contained in:
Toby Zerner
2015-05-07 08:22:15 +09:30
parent 8e1f6db85d
commit 05e561d3d6
4 changed files with 49 additions and 7 deletions

View File

@@ -76,7 +76,7 @@ class IndexAction extends SerializeCollectionAction
$response->content->addMeta('total', $total);
}
// $response->content->addMeta('moreUrl', $moreUrl);
static::addPaginationLinks($response, $request, route('flarum.api.discussions.index'), $total ?: $results->areMoreResults());
return $results->getDiscussions();
}