mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 08:44:46 +02:00
allow filtering servers by description; closes #4150
This commit is contained in:
parent
b3a57bd0ad
commit
ca39830333
@ -54,7 +54,7 @@ class ServerController extends ApplicationApiController
|
||||
public function index(GetServersRequest $request): array
|
||||
{
|
||||
$servers = QueryBuilder::for(Server::query())
|
||||
->allowedFilters(['uuid', 'uuidShort', 'name', 'image', 'external_id'])
|
||||
->allowedFilters(['uuid', 'uuidShort', 'name', 'description', 'image', 'external_id'])
|
||||
->allowedSorts(['id', 'uuid'])
|
||||
->paginate($request->query('per_page') ?? 50);
|
||||
|
||||
|
@ -43,6 +43,7 @@ class ClientController extends ClientApiController
|
||||
)->allowedFilters([
|
||||
'uuid',
|
||||
'name',
|
||||
'description',
|
||||
'external_id',
|
||||
AllowedFilter::custom('*', new MultiFieldServerFilter()),
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user