diff options
Diffstat (limited to 'core/Controller/ReferenceController.php')
-rw-r--r-- | core/Controller/ReferenceController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/Controller/ReferenceController.php b/core/Controller/ReferenceController.php index 523edcdbbfa..b4c88562bc9 100644 --- a/core/Controller/ReferenceController.php +++ b/core/Controller/ReferenceController.php @@ -11,6 +11,8 @@ namespace OC\Core\Controller; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\FrontpageRoute; +use OCP\AppFramework\Http\Attribute\NoCSRFRequired; +use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataDownloadResponse; use OCP\AppFramework\Http\DataResponse; use OCP\Collaboration\Reference\IReferenceManager; @@ -30,9 +32,6 @@ class ReferenceController extends Controller { } /** - * @PublicPage - * @NoCSRFRequired - * * Get a preview for a reference * * @param string $referenceId the reference cache key @@ -41,6 +40,8 @@ class ReferenceController extends Controller { * 200: Preview returned * 404: Reference not found */ + #[PublicPage] + #[NoCSRFRequired] #[FrontpageRoute(verb: 'GET', url: '/core/references/preview/{referenceId}')] public function preview(string $referenceId): DataDownloadResponse|DataResponse { $reference = $this->referenceManager->getReferenceByCacheKey($referenceId); |