mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
Use a standardized transformer base; replace all client transformers to call that base
This commit is contained in:
@@ -3,23 +3,19 @@
|
||||
namespace Pterodactyl\Transformers\Api\Client;
|
||||
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Transformers\Api\Transformer;
|
||||
|
||||
class AccountTransformer extends BaseClientTransformer
|
||||
class AccountTransformer extends Transformer
|
||||
{
|
||||
/**
|
||||
* Return the resource name for the JSONAPI output.
|
||||
*/
|
||||
public function getResourceName(): string
|
||||
{
|
||||
return 'user';
|
||||
return User::RESOURCE_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return basic information about the currently logged in user.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function transform(User $model)
|
||||
public function transform(User $model): array
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
|
||||
Reference in New Issue
Block a user