From 80b804b2979fed9f527b39c22e41d5d23ce5b214 Mon Sep 17 00:00:00 2001 From: Ian Morland Date: Thu, 26 Aug 2021 10:47:34 +0100 Subject: [PATCH] Pass filter params to getApiDocument (#3037) * Pass filter params to getApiDocument * Set filters directly --- framework/core/src/Forum/Content/Index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/core/src/Forum/Content/Index.php b/framework/core/src/Forum/Content/Index.php index a290bcecf..ca4fe0e65 100644 --- a/framework/core/src/Forum/Content/Index.php +++ b/framework/core/src/Forum/Content/Index.php @@ -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] ];