Fix Index content, only use search when applicable.

This commit is contained in:
Alexander Skvortsov 2021-03-12 15:30:36 -05:00
parent 38dc12ef0d
commit 2f0192d47d

View File

@ -75,10 +75,14 @@ class Index
$params = [
'sort' => $sort && isset($sortMap[$sort]) ? $sortMap[$sort] : '',
'filter' => compact('q'),
'filter' => [],
'page' => ['offset' => ($page - 1) * 20, 'limit' => 20]
];
if ($q) {
$params['filter']['q'] = $q;
}
$apiDocument = $this->getApiDocument($request->getAttribute('actor'), $params);
$defaultRoute = $this->settings->get('default_route');