2021-01-07 16:32:04 +00:00
|
|
|
<?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;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-01-07 17:21:09 +00:00
|
|
|
* Returns version information.
|
2021-01-07 16:32:04 +00:00
|
|
|
*/
|
2021-01-07 17:21:09 +00:00
|
|
|
public function __invoke(): JsonResponse
|
2021-01-07 16:32:04 +00:00
|
|
|
{
|
|
|
|
return new JsonResponse($this->softwareVersionService->getVersionData());
|
|
|
|
}
|
|
|
|
}
|