2023-07-02 22:12:40 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace OCA\RePod\Controller;
|
|
|
|
|
|
|
|
use OCA\RePod\AppInfo\Application;
|
2023-07-28 00:37:57 +00:00
|
|
|
use OCA\RePod\Service\FyydService;
|
2023-07-02 22:12:40 +00:00
|
|
|
use OCP\AppFramework\Controller;
|
|
|
|
use OCP\AppFramework\Http\JSONResponse;
|
|
|
|
use OCP\IRequest;
|
|
|
|
|
2023-08-01 21:18:37 +00:00
|
|
|
class ToplistController extends Controller
|
2023-07-02 22:12:40 +00:00
|
|
|
{
|
2023-07-02 22:52:14 +00:00
|
|
|
public function __construct(
|
|
|
|
IRequest $request,
|
2023-07-28 00:37:57 +00:00
|
|
|
private FyydService $fyydService
|
2023-07-02 22:52:14 +00:00
|
|
|
) {
|
2023-07-02 22:12:40 +00:00
|
|
|
parent::__construct(Application::APP_ID, $request);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @NoAdminRequired
|
|
|
|
* @NoCSRFRequired
|
|
|
|
*/
|
2023-12-23 16:25:20 +00:00
|
|
|
public function index(): JSONResponse {
|
2023-12-24 15:59:34 +00:00
|
|
|
return new JSONResponse($this->fyydService->hot());
|
2023-07-02 22:12:40 +00:00
|
|
|
}
|
|
|
|
}
|