misc_pterodactyl-panel/app/Http/Controllers/Api/Application/VersionController.php
2021-03-05 10:03:12 -07:00

29 lines
713 B
PHP

<?php
namespace Pterodactyl\Http\Controllers\Api\Application;
use Illuminate\Http\JsonResponse;
use Pterodactyl\Services\Helpers\SoftwareVersionService;
class VersionController extends ApplicationApiController
{
private SoftwareVersionService $softwareVersionService;
/**
* VersionController constructor.
*/
public function __construct(SoftwareVersionService $softwareVersionService)
{
parent::__construct();
$this->softwareVersionService = $softwareVersionService;
}
/**
* Returns version information.
*/
public function __invoke(): JsonResponse
{
return new JsonResponse($this->softwareVersionService->getVersionData());
}
}