Pass filter params to getApiDocument (#3037)

* Pass filter params to getApiDocument

* Set filters directly
This commit is contained in:
Ian Morland 2021-08-26 10:47:34 +01:00 committed by GitHub
parent fa653d96ee
commit 80b804b297

View File

@ -68,12 +68,13 @@ class Index
$sort = Arr::pull($queryParams, 'sort');
$q = Arr::pull($queryParams, 'q');
$page = max(1, intval(Arr::pull($queryParams, 'page')));
$filters = Arr::pull($queryParams, 'filter', []);
$sortMap = $this->getSortMap();
$params = [
'sort' => $sort && isset($sortMap[$sort]) ? $sortMap[$sort] : '',
'filter' => [],
'filter' => $filters,
'page' => ['offset' => ($page - 1) * 20, 'limit' => 20]
];