misc_pterodactyl-panel/app/Http/Controllers/Api/Application/Nodes/NodeConfigurationController.php
Matthew Penner cbcf62086f
Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-14 10:59:20 -06:00

21 lines
742 B
PHP

<?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.
*/
public function __invoke(GetNodeRequest $request, Node $node): JsonResponse
{
return new JsonResponse($node->getConfiguration());
}
}