Merge pull request #1393 from matthewpi/patch-1

Fix API method return, namespace issue
This commit is contained in:
Dane Everitt 2018-12-02 13:01:37 -08:00 committed by GitHub
commit 4d8760f335
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -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\GetLocationRequest;
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationsRequest; use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationsRequest;
use Pterodactyl\Http\Requests\Api\Application\Locations\DeleteLocationRequest; use Pterodactyl\Http\Requests\Api\Application\Locations\DeleteLocationRequest;
use Pterodactyl\Http\Requests\Api\Application\Locations\StoreLocationRequest;
use Pterodactyl\Http\Requests\Api\Application\Locations\UpdateLocationRequest; use Pterodactyl\Http\Requests\Api\Application\Locations\UpdateLocationRequest;
class LocationController extends ApplicationApiController 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 * Store a new location on the Panel and return a HTTP/201 response code with the
* new location attached. * 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 * @return \Illuminate\Http\JsonResponse
* *
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -71,14 +71,14 @@ class AllocationController extends ApplicationApiController
* Store new allocations for a given node. * Store new allocations for a given node.
* *
* @param \Pterodactyl\Http\Requests\Api\Application\Allocations\StoreAllocationRequest $request * @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\CidrOutOfRangeException
* @throws \Pterodactyl\Exceptions\Service\Allocation\InvalidPortMappingException * @throws \Pterodactyl\Exceptions\Service\Allocation\InvalidPortMappingException
* @throws \Pterodactyl\Exceptions\Service\Allocation\PortOutOfRangeException * @throws \Pterodactyl\Exceptions\Service\Allocation\PortOutOfRangeException
* @throws \Pterodactyl\Exceptions\Service\Allocation\TooManyPortsInRangeException * @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()); $this->assignmentService->handle($request->getModel(Node::class), $request->validated());

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Pterodactyl\Http\Controllers\Api\Application\Locations; namespace Pterodactyl\Http\Requests\Api\Application\Locations;
use Pterodactyl\Models\Location; use Pterodactyl\Models\Location;
use Pterodactyl\Services\Acl\Api\AdminAcl; use Pterodactyl\Services\Acl\Api\AdminAcl;