From afe128042fb7bee55677cfe515ee5bc52bae02fe Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 19 Nov 2018 21:54:15 -0700 Subject: [PATCH 1/3] Wait a second, that method doesn't return an array --- .../Api/Application/Nodes/AllocationController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/Application/Nodes/AllocationController.php b/app/Http/Controllers/Api/Application/Nodes/AllocationController.php index 7bbe98622..094834fe8 100644 --- a/app/Http/Controllers/Api/Application/Nodes/AllocationController.php +++ b/app/Http/Controllers/Api/Application/Nodes/AllocationController.php @@ -71,14 +71,14 @@ class AllocationController extends ApplicationApiController * Store new allocations for a given node. * * @param \Pterodactyl\Http\Requests\Api\Application\Allocations\StoreAllocationRequest $request - * @return array + * @return \Illuminate\Http\Response * * @throws \Pterodactyl\Exceptions\Service\Allocation\CidrOutOfRangeException * @throws \Pterodactyl\Exceptions\Service\Allocation\InvalidPortMappingException * @throws \Pterodactyl\Exceptions\Service\Allocation\PortOutOfRangeException * @throws \Pterodactyl\Exceptions\Service\Allocation\TooManyPortsInRangeException */ - public function store(StoreAllocationRequest $request): array + public function store(StoreAllocationRequest $request): Response { $this->assignmentService->handle($request->getModel(Node::class), $request->validated()); From 4ad9b2627bf453c965508627588442878df87dc0 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 19 Nov 2018 22:03:03 -0700 Subject: [PATCH 2/3] Fix StoreLocationRequest namespace --- .../Requests/Api/Application/Locations/StoreLocationRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/Api/Application/Locations/StoreLocationRequest.php b/app/Http/Requests/Api/Application/Locations/StoreLocationRequest.php index 317b6c540..761c669d6 100644 --- a/app/Http/Requests/Api/Application/Locations/StoreLocationRequest.php +++ b/app/Http/Requests/Api/Application/Locations/StoreLocationRequest.php @@ -1,6 +1,6 @@ Date: Mon, 19 Nov 2018 22:04:05 -0700 Subject: [PATCH 3/3] Fix LocationController#store() --- .../Api/Application/Locations/LocationController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/Application/Locations/LocationController.php b/app/Http/Controllers/Api/Application/Locations/LocationController.php index dde7354af..b829268d7 100644 --- a/app/Http/Controllers/Api/Application/Locations/LocationController.php +++ b/app/Http/Controllers/Api/Application/Locations/LocationController.php @@ -14,6 +14,7 @@ use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController; use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationRequest; use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationsRequest; use Pterodactyl\Http\Requests\Api\Application\Locations\DeleteLocationRequest; +use Pterodactyl\Http\Requests\Api\Application\Locations\StoreLocationRequest; use Pterodactyl\Http\Requests\Api\Application\Locations\UpdateLocationRequest; class LocationController extends ApplicationApiController @@ -92,7 +93,7 @@ class LocationController extends ApplicationApiController * Store a new location on the Panel and return a HTTP/201 response code with the * new location attached. * - * @param \Pterodactyl\Http\Controllers\Api\Application\Locations\StoreLocationRequest $request + * @param \Pterodactyl\Http\Requests\Api\Application\Locations\StoreLocationRequest $request * @return \Illuminate\Http\JsonResponse * * @throws \Pterodactyl\Exceptions\Model\DataValidationException