diff --git a/app/Http/Controllers/Api/Client/WebauthnController.php b/app/Http/Controllers/Api/Client/WebauthnController.php index 3e3aad679..bc4eb82ef 100644 --- a/app/Http/Controllers/Api/Client/WebauthnController.php +++ b/app/Http/Controllers/Api/Client/WebauthnController.php @@ -87,6 +87,8 @@ class WebauthnController extends ClientApiController $request->input('name'), ); + + return $this->fractal->item($webauthnKey) ->transformWith(WebauthnKeyTransformer::class) ->toArray(); diff --git a/app/Transformers/Api/Client/WebauthnKeyTransformer.php b/app/Transformers/Api/Client/WebauthnKeyTransformer.php index 062adb9fb..07c47875e 100644 --- a/app/Transformers/Api/Client/WebauthnKeyTransformer.php +++ b/app/Transformers/Api/Client/WebauthnKeyTransformer.php @@ -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,