mirror of
https://git.crystalyx.net/Xefir/repod.git
synced 2024-12-28 01:32:49 +01:00
26 lines
551 B
PHP
26 lines
551 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 $q): JSONResponse {
|
|
return new JSONResponse($this->multiPodService->search($q));
|
|
}
|
|
}
|