Use a standardized transformer base; replace all client transformers to call that base

This commit is contained in:
Dane Everitt 2021-08-07 13:06:45 -07:00
parent 2203a4d87e
commit cf500a1a54
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
25 changed files with 255 additions and 379 deletions

View file

@ -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);