Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Http/Controllers/Api/Application/Nodes/NodeConfigurationController.php
10277 views
1
<?php
2
3
namespace Pterodactyl\Http\Controllers\Api\Application\Nodes;
4
5
use Pterodactyl\Models\Node;
6
use Illuminate\Http\JsonResponse;
7
use Pterodactyl\Http\Requests\Api\Application\Nodes\GetNodeRequest;
8
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
9
10
class NodeConfigurationController extends ApplicationApiController
11
{
12
/**
13
* Returns the configuration information for a node. This allows for automated deployments
14
* to remote machines so long as an API key is provided to the machine to make the request
15
* with, and the node is known.
16
*/
17
public function __invoke(GetNodeRequest $request, Node $node): JsonResponse
18
{
19
return new JsonResponse($node->getConfiguration());
20
}
21
}
22
23