Merge pull request #2782 from TrixterTheTux/develop
Fix not being able to retrieve server's variables
This commit is contained in:
commit
21d8dd455e
2 changed files with 9 additions and 5 deletions
|
@ -3,6 +3,10 @@ This file is a running track of new features and fixes to each version of the pa
|
||||||
|
|
||||||
This project follows [Semantic Versioning](http://semver.org) guidelines.
|
This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
### Fixed
|
||||||
|
* Fixes the application API unable to return server's variables.
|
||||||
|
|
||||||
## v1.1.3
|
## v1.1.3
|
||||||
### Fixed
|
### Fixed
|
||||||
* Server bulk power actions command will no longer attempt to run commands against installing or suspended servers.
|
* Server bulk power actions command will no longer attempt to run commands against installing or suspended servers.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Transformers\Api\Application;
|
namespace Pterodactyl\Transformers\Api\Application;
|
||||||
|
|
||||||
use Pterodactyl\Models\ServerVariable;
|
use Pterodactyl\Models\EggVariable;
|
||||||
use Pterodactyl\Services\Acl\Api\AdminAcl;
|
use Pterodactyl\Services\Acl\Api\AdminAcl;
|
||||||
|
|
||||||
class ServerVariableTransformer extends BaseTransformer
|
class ServerVariableTransformer extends BaseTransformer
|
||||||
|
@ -27,10 +27,10 @@ class ServerVariableTransformer extends BaseTransformer
|
||||||
/**
|
/**
|
||||||
* Return a generic transformed server variable array.
|
* Return a generic transformed server variable array.
|
||||||
*
|
*
|
||||||
* @param \Pterodactyl\Models\ServerVariable $variable
|
* @param \Pterodactyl\Models\EggVariable $variable
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function transform(ServerVariable $variable)
|
public function transform(EggVariable $variable)
|
||||||
{
|
{
|
||||||
return $variable->toArray();
|
return $variable->toArray();
|
||||||
}
|
}
|
||||||
|
@ -38,11 +38,11 @@ class ServerVariableTransformer extends BaseTransformer
|
||||||
/**
|
/**
|
||||||
* Return the parent service variable data.
|
* Return the parent service variable data.
|
||||||
*
|
*
|
||||||
* @param \Pterodactyl\Models\ServerVariable $variable
|
* @param \Pterodactyl\Models\EggVariable $variable
|
||||||
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
|
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
|
||||||
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
|
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
|
||||||
*/
|
*/
|
||||||
public function includeParent(ServerVariable $variable)
|
public function includeParent(EggVariable $variable)
|
||||||
{
|
{
|
||||||
if (! $this->authorize(AdminAcl::RESOURCE_EGGS)) {
|
if (! $this->authorize(AdminAcl::RESOURCE_EGGS)) {
|
||||||
return $this->null();
|
return $this->null();
|
||||||
|
|
Loading…
Reference in a new issue