Rename APIKey to ApiKey
This commit is contained in:
parent
7aa540b895
commit
ad3a954256
14 changed files with 53 additions and 53 deletions
|
@ -4,7 +4,7 @@ namespace Pterodactyl\Http\Middleware\Api\Admin;
|
|||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Pterodactyl\Models\APIKey;
|
||||
use Pterodactyl\Models\ApiKey;
|
||||
use Illuminate\Auth\AuthManager;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
@ -61,8 +61,8 @@ class AuthenticateKey
|
|||
}
|
||||
|
||||
$raw = $request->bearerToken();
|
||||
$identifier = substr($raw, 0, APIKey::IDENTIFIER_LENGTH);
|
||||
$token = substr($raw, APIKey::IDENTIFIER_LENGTH);
|
||||
$identifier = substr($raw, 0, ApiKey::IDENTIFIER_LENGTH);
|
||||
$token = substr($raw, ApiKey::IDENTIFIER_LENGTH);
|
||||
|
||||
try {
|
||||
$model = $this->repository->findFirstWhere([['identifier', '=', $identifier]]);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Pterodactyl\Http\Requests\API\Admin;
|
||||
|
||||
use Pterodactyl\Models\APIKey;
|
||||
use Pterodactyl\Models\ApiKey;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Pterodactyl\Exceptions\PterodactylException;
|
||||
use Pterodactyl\Services\Acl\Api\AdminAcl as Acl;
|
||||
|
@ -66,9 +66,9 @@ abstract class ApiAdminRequest extends FormRequest
|
|||
/**
|
||||
* Return the API key being used for the request.
|
||||
*
|
||||
* @return \Pterodactyl\Models\APIKey
|
||||
* @return \Pterodactyl\Models\ApiKey
|
||||
*/
|
||||
public function key(): APIKey
|
||||
public function key(): ApiKey
|
||||
{
|
||||
return $this->attributes->get('api_key');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue