fix SecurityKeyFactory
This commit is contained in:
parent
940c899eab
commit
aa380d4c0d
1 changed files with 0 additions and 5 deletions
|
@ -3,7 +3,6 @@
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Ramsey\Uuid\Uuid;
|
use Ramsey\Uuid\Uuid;
|
||||||
use Pterodactyl\Models\User;
|
|
||||||
use Pterodactyl\Models\SecurityKey;
|
use Pterodactyl\Models\SecurityKey;
|
||||||
use Webauthn\TrustPath\EmptyTrustPath;
|
use Webauthn\TrustPath\EmptyTrustPath;
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
@ -24,15 +23,11 @@ class SecurityKeyFactory extends Factory
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'uuid' => Uuid::uuid4()->toString(),
|
'uuid' => Uuid::uuid4()->toString(),
|
||||||
'user_id' => User::factory(),
|
|
||||||
'name' => $this->faker->word,
|
'name' => $this->faker->word,
|
||||||
'type' => 'public-key',
|
'type' => 'public-key',
|
||||||
'transports' => [],
|
'transports' => [],
|
||||||
'attestation_type' => 'none',
|
'attestation_type' => 'none',
|
||||||
'trust_path' => new EmptyTrustPath(),
|
'trust_path' => new EmptyTrustPath(),
|
||||||
'user_handle' => function (array $attributes) {
|
|
||||||
return User::find($attributes['user_id'])->uuid;
|
|
||||||
},
|
|
||||||
'counter' => 0,
|
'counter' => 0,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue