1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 00:47:00 +02:00

Pass filter params (#141)

* Pass  params to getApiDocument

* Reverse arrays
This commit is contained in:
Ian Morland
2021-08-26 10:48:12 +01:00
committed by GitHub
parent 7a0923dce2
commit e8111a6f8f

View File

@@ -63,6 +63,7 @@ class Tag
$sort = Arr::pull($queryParams, 'sort');
$q = Arr::pull($queryParams, 'q', '');
$page = Arr::pull($queryParams, 'page', 1);
$filters = Arr::pull($queryParams, 'filter', []);
$sortMap = $this->getSortMap();
@@ -77,6 +78,8 @@ class Tag
'page' => ['offset' => ($page - 1) * 20, 'limit' => 20]
];
$params['filter'] = array_merge($filters, $params['filter']);
$apiDocument = $this->getApiDocument($request, $params);
$tagsDocument = $this->getTagsDocument($request, $slug);