diff options
Diffstat (limited to 'core/Controller/UnifiedSearchController.php')
-rw-r--r-- | core/Controller/UnifiedSearchController.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/Controller/UnifiedSearchController.php b/core/Controller/UnifiedSearchController.php index 236ca845da6..20d6fb5e59c 100644 --- a/core/Controller/UnifiedSearchController.php +++ b/core/Controller/UnifiedSearchController.php @@ -15,6 +15,8 @@ use OC\Search\SearchQuery; use OC\Search\UnsupportedFilter; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\ApiRoute; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\NoCSRFRequired; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\IRequest; @@ -40,9 +42,6 @@ class UnifiedSearchController extends OCSController { } /** - * @NoAdminRequired - * @NoCSRFRequired - * * Get the providers for unified search * * @param string $from the url the user is currently at @@ -50,6 +49,8 @@ class UnifiedSearchController extends OCSController { * * 200: Providers returned */ + #[NoAdminRequired] + #[NoCSRFRequired] #[ApiRoute(verb: 'GET', url: '/providers', root: '/search')] public function getProviders(string $from = ''): DataResponse { [$route, $parameters] = $this->getRouteInformation($from); @@ -61,9 +62,6 @@ class UnifiedSearchController extends OCSController { } /** - * @NoAdminRequired - * @NoCSRFRequired - * * Launch a search for a specific search provider. * * Additional filters are available for each provider. @@ -81,6 +79,8 @@ class UnifiedSearchController extends OCSController { * 200: Search entries returned * 400: Searching is not possible */ + #[NoAdminRequired] + #[NoCSRFRequired] #[ApiRoute(verb: 'GET', url: '/providers/{providerId}/search', root: '/search')] public function search( string $providerId, |