2020-04-13 00:20:09 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Controllers\Api\Application\Nodes;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Node;
|
|
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
use Pterodactyl\Http\Requests\Api\Application\Nodes\GetNodeRequest;
|
|
|
|
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
|
|
|
|
|
|
|
|
class NodeConfigurationController extends ApplicationApiController
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Returns the configuration information for a node. This allows for automated deployments
|
|
|
|
* to remote machines so long as an API key is provided to the machine to make the request
|
|
|
|
* with, and the node is known.
|
|
|
|
*/
|
2022-10-14 16:59:20 +00:00
|
|
|
public function __invoke(GetNodeRequest $request, Node $node): JsonResponse
|
2020-04-13 00:20:09 +00:00
|
|
|
{
|
2022-05-04 23:23:01 +00:00
|
|
|
return new JsonResponse($node->getConfiguration());
|
2020-04-13 00:20:09 +00:00
|
|
|
}
|
|
|
|
}
|