Skip to content

Commit 4d8760f

Browse files
authored
Merge pull request pterodactyl#1393 from matthewpi/patch-1
Fix API method return, namespace issue
2 parents 24dfdf2 + d6e9770 commit 4d8760f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

app/Http/Controllers/Api/Application/Locations/LocationController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationRequest;
1515
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationsRequest;
1616
use Pterodactyl\Http\Requests\Api\Application\Locations\DeleteLocationRequest;
17+
use Pterodactyl\Http\Requests\Api\Application\Locations\StoreLocationRequest;
1718
use Pterodactyl\Http\Requests\Api\Application\Locations\UpdateLocationRequest;
1819

1920
class LocationController extends ApplicationApiController
@@ -92,7 +93,7 @@ public function view(GetLocationRequest $request): array
9293
* Store a new location on the Panel and return a HTTP/201 response code with the
9394
* new location attached.
9495
*
95-
* @param \Pterodactyl\Http\Controllers\Api\Application\Locations\StoreLocationRequest $request
96+
* @param \Pterodactyl\Http\Requests\Api\Application\Locations\StoreLocationRequest $request
9697
* @return \Illuminate\Http\JsonResponse
9798
*
9899
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

app/Http/Controllers/Api/Application/Nodes/AllocationController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ public function index(GetAllocationsRequest $request): array
7171
* Store new allocations for a given node.
7272
*
7373
* @param \Pterodactyl\Http\Requests\Api\Application\Allocations\StoreAllocationRequest $request
74-
* @return array
74+
* @return \Illuminate\Http\Response
7575
*
7676
* @throws \Pterodactyl\Exceptions\Service\Allocation\CidrOutOfRangeException
7777
* @throws \Pterodactyl\Exceptions\Service\Allocation\InvalidPortMappingException
7878
* @throws \Pterodactyl\Exceptions\Service\Allocation\PortOutOfRangeException
7979
* @throws \Pterodactyl\Exceptions\Service\Allocation\TooManyPortsInRangeException
8080
*/
81-
public function store(StoreAllocationRequest $request): array
81+
public function store(StoreAllocationRequest $request): Response
8282
{
8383
$this->assignmentService->handle($request->getModel(Node::class), $request->validated());
8484

app/Http/Requests/Api/Application/Locations/StoreLocationRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Pterodactyl\Http\Controllers\Api\Application\Locations;
3+
namespace Pterodactyl\Http\Requests\Api\Application\Locations;
44

55
use Pterodactyl\Models\Location;
66
use Pterodactyl\Services\Acl\Api\AdminAcl;

0 commit comments

Comments
 (0)