mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-02 20:35:50 -05:00
api(application): v2 backport
This commit is contained in:
@@ -18,7 +18,7 @@ class ApiKeyController extends ClientApiController
|
||||
public function index(ClientApiRequest $request): array
|
||||
{
|
||||
return $this->fractal->collection($request->user()->apiKeys)
|
||||
->transformWith($this->getTransformer(ApiKeyTransformer::class))
|
||||
->transformWith(ApiKeyTransformer::class)
|
||||
->toArray();
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class ApiKeyController extends ClientApiController
|
||||
->log();
|
||||
|
||||
return $this->fractal->item($token->accessToken)
|
||||
->transformWith($this->getTransformer(ApiKeyTransformer::class))
|
||||
->transformWith(ApiKeyTransformer::class)
|
||||
->addMeta(['secret_token' => $token->plainTextToken])
|
||||
->toArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user