Initial pass at deleting as much removed logic as possible; still need to migrate old keys and permissions over
This commit is contained in:
parent
dfff8ad667
commit
b47d262ee0
19 changed files with 4 additions and 1036 deletions
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Str;
|
||||
use Pterodactyl\Models\ApiKey;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ApiKeyFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = ApiKey::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
static $token;
|
||||
|
||||
return [
|
||||
'key_type' => ApiKey::TYPE_APPLICATION,
|
||||
'identifier' => Str::random(ApiKey::IDENTIFIER_LENGTH),
|
||||
'token' => $token ?: $token = encrypt(Str::random(ApiKey::KEY_LENGTH)),
|
||||
'allowed_ips' => null,
|
||||
'memo' => 'Test Function Key',
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue