misc_pterodactyl-panel/app/Http/Controllers/Api/Application/VersionController.php

26 lines
594 B
PHP
Raw Normal View History

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