repod/lib/Controller/ToplistController.php
Michel Roux a4c4d3a2ce
Some checks failed
repod / xml (push) Successful in 20s
repod / php (push) Failing after 1m3s
repod / nodejs (push) Successful in 1m48s
Refacto modal and fix double guid
2023-12-24 16:59:34 +01:00

30 lines
573 B
PHP

<?php
declare(strict_types=1);
namespace OCA\RePod\Controller;
use OCA\RePod\AppInfo\Application;
use OCA\RePod\Service\FyydService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
class ToplistController extends Controller
{
public function __construct(
IRequest $request,
private FyydService $fyydService
) {
parent::__construct(Application::APP_ID, $request);
}
/**
* @NoAdminRequired
* @NoCSRFRequired
*/
public function index(): JSONResponse {
return new JSONResponse($this->fyydService->hot());
}
}