mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 05:43:45 +02:00
Always allow specifying a page size with the API; closes #3218
This commit is contained in:
@@ -43,7 +43,7 @@ class AllocationController extends ApplicationApiController
|
||||
*/
|
||||
public function index(GetAllocationsRequest $request, Node $node): array
|
||||
{
|
||||
$allocations = $node->allocations()->paginate(50);
|
||||
$allocations = $node->allocations()->paginate($request->query('per_page') ?? 50);
|
||||
|
||||
return $this->fractal->collection($allocations)
|
||||
->transformWith($this->getTransformer(AllocationTransformer::class))
|
||||
@@ -53,6 +53,7 @@ class AllocationController extends ApplicationApiController
|
||||
/**
|
||||
* Store new allocations for a given node.
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Service\Allocation\CidrOutOfRangeException
|
||||
* @throws \Pterodactyl\Exceptions\Service\Allocation\InvalidPortMappingException
|
||||
* @throws \Pterodactyl\Exceptions\Service\Allocation\PortOutOfRangeException
|
||||
|
||||
Reference in New Issue
Block a user