mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 20:05:48 -05:00
api(application): v2 backport
This commit is contained in:
@@ -14,8 +14,12 @@ class NodeConfigurationController extends ApplicationApiController
|
||||
* 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
|
||||
public function __invoke(GetNodeRequest $request, Node $node): JsonResponse|string
|
||||
{
|
||||
if ($request->query('format') === 'yaml') {
|
||||
return $node->getYamlConfiguration();
|
||||
}
|
||||
|
||||
return new JsonResponse($node->getConfiguration());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user