Add migrations to handle cascade deletions for servers and users
This commit is contained in:
parent
2588c25b0b
commit
8953f83f87
4 changed files with 130 additions and 1 deletions
|
@ -30,6 +30,7 @@ use Carbon;
|
|||
use Request;
|
||||
use Pterodactyl\Models\APIKey;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Pterodactyl\Services\ApiKeyService;
|
||||
|
||||
class MacroServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -60,7 +61,7 @@ class MacroServiceProvider extends ServiceProvider
|
|||
|
||||
$parts = explode('.', Request::bearerToken());
|
||||
|
||||
if (count($parts) === 2 && strlen($parts[0]) === APIKey::PUBLIC_KEY_LEN) {
|
||||
if (count($parts) === 2 && strlen($parts[0]) === ApiKeyService::PUB_CRYPTO_BYTES * 2) {
|
||||
// Because the key itself isn't changing frequently, we simply cache this for
|
||||
// 15 minutes to speed up the API and keep requests flowing.
|
||||
return Cache::tags([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue