mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
Use a standardized transformer base; replace all client transformers to call that base
This commit is contained in:
@@ -51,13 +51,13 @@ abstract class ApplicationApiController extends Controller
|
||||
* @return \Pterodactyl\Transformers\Api\Application\BaseTransformer
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public function getTransformer(string $abstract)
|
||||
{
|
||||
/** @var \Pterodactyl\Transformers\Api\Application\BaseTransformer $transformer */
|
||||
$transformer = Container::getInstance()->make($abstract);
|
||||
$transformer->setRootAdmin($this->request->user()->root_admin);
|
||||
$transformer->setKey($this->request->attributes->get('api_key'));
|
||||
|
||||
Assert::isInstanceOf($transformer, BaseTransformer::class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user