Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -13,11 +13,9 @@ use Pterodactyl\Http\Requests\Api\Client\Account\StoreApiKeyRequest;
|
|||
class ApiKeyController extends ClientApiController
|
||||
{
|
||||
/**
|
||||
* Returns all of the API keys that exist for the given client.
|
||||
*
|
||||
* @return array
|
||||
* Returns all the API keys that exist for the given client.
|
||||
*/
|
||||
public function index(ClientApiRequest $request)
|
||||
public function index(ClientApiRequest $request): array
|
||||
{
|
||||
return $this->fractal->collection($request->user()->apiKeys)
|
||||
->transformWith($this->getTransformer(ApiKeyTransformer::class))
|
||||
|
@ -26,6 +24,8 @@ class ApiKeyController extends ClientApiController
|
|||
|
||||
/**
|
||||
* Store a new API key for a user's account.
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
*/
|
||||
public function store(StoreApiKeyRequest $request): array
|
||||
{
|
||||
|
@ -51,10 +51,8 @@ class ApiKeyController extends ClientApiController
|
|||
|
||||
/**
|
||||
* Deletes a given API key.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function delete(ClientApiRequest $request, string $identifier)
|
||||
public function delete(ClientApiRequest $request, string $identifier): JsonResponse
|
||||
{
|
||||
/** @var \Pterodactyl\Models\ApiKey $key */
|
||||
$key = $request->user()->apiKeys()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue