allow filtering servers by description; closes #4150
This commit is contained in:
parent
b3a57bd0ad
commit
ca39830333
2 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,7 @@ class ServerController extends ApplicationApiController
|
||||||
public function index(GetServersRequest $request): array
|
public function index(GetServersRequest $request): array
|
||||||
{
|
{
|
||||||
$servers = QueryBuilder::for(Server::query())
|
$servers = QueryBuilder::for(Server::query())
|
||||||
->allowedFilters(['uuid', 'uuidShort', 'name', 'image', 'external_id'])
|
->allowedFilters(['uuid', 'uuidShort', 'name', 'description', 'image', 'external_id'])
|
||||||
->allowedSorts(['id', 'uuid'])
|
->allowedSorts(['id', 'uuid'])
|
||||||
->paginate($request->query('per_page') ?? 50);
|
->paginate($request->query('per_page') ?? 50);
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ class ClientController extends ClientApiController
|
||||||
)->allowedFilters([
|
)->allowedFilters([
|
||||||
'uuid',
|
'uuid',
|
||||||
'name',
|
'name',
|
||||||
|
'description',
|
||||||
'external_id',
|
'external_id',
|
||||||
AllowedFilter::custom('*', new MultiFieldServerFilter()),
|
AllowedFilter::custom('*', new MultiFieldServerFilter()),
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue