api(application): v2 backport
This commit is contained in:
parent
4cd0bee231
commit
67bf3e342e
172 changed files with 2922 additions and 1579 deletions
|
@ -4,8 +4,9 @@ namespace Pterodactyl\Transformers\Api\Client;
|
|||
|
||||
use Illuminate\Support\Str;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Transformers\Api\Transformer;
|
||||
|
||||
class UserTransformer extends BaseClientTransformer
|
||||
class UserTransformer extends Transformer
|
||||
{
|
||||
/**
|
||||
* Return the resource name for the JSONAPI output.
|
||||
|
@ -25,9 +26,9 @@ class UserTransformer extends BaseClientTransformer
|
|||
'uuid' => $model->uuid,
|
||||
'username' => $model->username,
|
||||
'email' => $model->email,
|
||||
'image' => 'https://gravatar.com/avatar/' . md5(Str::lower($model->email)),
|
||||
'image' => $model->avatarURL(),
|
||||
'2fa_enabled' => $model->use_totp,
|
||||
'created_at' => $model->created_at->toAtomString(),
|
||||
'created_at' => self::formatTimestamp($model->created_at),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue