Add tables for almost every admin change, update composer dependencies
This commit is contained in:
parent
8f1a5bf0ab
commit
59de9576c9
42 changed files with 3327 additions and 1241 deletions
|
@ -17,7 +17,7 @@ class AdminRoleTransformer extends BaseTransformer
|
|||
}
|
||||
|
||||
/**
|
||||
* Return a transformed User model that can be consumed by external services.
|
||||
* Return a transformed AdminRole model that can be consumed by external services.
|
||||
*
|
||||
* @param \Pterodactyl\Models\AdminRole $model
|
||||
* @return array
|
||||
|
|
|
@ -58,6 +58,7 @@ class DatabaseHostTransformer extends BaseTransformer
|
|||
*
|
||||
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
|
||||
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
public function includeDatabases(DatabaseHost $model)
|
||||
{
|
||||
|
|
38
app/Transformers/Api/Application/MountTransformer.php
Normal file
38
app/Transformers/Api/Application/MountTransformer.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Transformers\Api\Application;
|
||||
|
||||
use Pterodactyl\Models\Mount;
|
||||
|
||||
class MountTransformer extends BaseTransformer
|
||||
{
|
||||
/**
|
||||
* Return the resource name for the JSONAPI output.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getResourceName(): string
|
||||
{
|
||||
return Mount::RESOURCE_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a transformed Mount model that can be consumed by external services.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Mount $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Mount $model): array
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'uuid' => $model->uuid,
|
||||
'name' => $model->name,
|
||||
'description' => $model->description,
|
||||
'source' => $model->source,
|
||||
'target' => $model->target,
|
||||
'read_only' => $model->read_only,
|
||||
'user_mountable' => $model->user_mountable,
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue