repod/lib/Controller/SearchController.php
Michel Roux c951a93b8c
All checks were successful
repod / xml (push) Successful in 16s
repod / php (push) Successful in 57s
repod / nodejs (push) Successful in 2m8s
repod / release (push) Has been skipped
feat: add unified search integration
2024-01-18 11:43:58 +01:00

26 lines
559 B
PHP

<?php
declare(strict_types=1);
namespace OCA\RePod\Controller;
use OCA\RePod\AppInfo\Application;
use OCA\RePod\Service\MultiPodService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
class SearchController extends Controller
{
public function __construct(
IRequest $request,
private MultiPodService $multiPodService
) {
parent::__construct(Application::APP_ID, $request);
}
public function index(string $value): JSONResponse {
return new JSONResponse($this->multiPodService->search($value));
}
}