fix type error with WebauthnKeyTransformer

This commit is contained in:
Matthew Penner 2021-09-13 02:34:01 -06:00
parent 4da38891c7
commit 5843c34240
No known key found for this signature in database
GPG key ID: 030E4AB751DC756F
2 changed files with 5 additions and 1 deletions

View file

@ -87,6 +87,8 @@ class WebauthnController extends ClientApiController
$request->input('name'),
);
return $this->fractal->item($webauthnKey)
->transformWith(WebauthnKeyTransformer::class)
->toArray();

View file

@ -17,8 +17,10 @@ class WebauthnKeyTransformer extends Transformer
/**
* Return basic information about the currently logged in user.
*
* @param \Pterodactyl\Models\WebauthnKey|\LaravelWebauthn\Models\WebauthnKey $model
*/
public function transform(WebauthnKey $model): array
public function transform($model): array
{
return [
'id' => $model->id,