From 2c51933b6bc5e8f2633114e9acc493fb72a314d7 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Wed, 10 Jan 2024 12:35:44 +0100 Subject: refactor(core): Switch to attribute based routing Signed-off-by: provokateurin --- core/Controller/PreviewController.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/Controller/PreviewController.php') diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index 7adec03814c..34c21bd3ecb 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -30,6 +30,7 @@ namespace OC\Core\Controller; use OCA\Files_Sharing\SharedStorage; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\FrontpageRoute; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\FileDisplayResponse; use OCP\AppFramework\Http\RedirectResponse; @@ -74,6 +75,7 @@ class PreviewController extends Controller { * 403: Getting preview is not allowed * 404: Preview not found */ + #[FrontpageRoute(verb: 'GET', url: '/core/preview.png')] public function getPreview( string $file = '', int $x = 32, @@ -117,6 +119,7 @@ class PreviewController extends Controller { * 403: Getting preview is not allowed * 404: Preview not found */ + #[FrontpageRoute(verb: 'GET', url: '/core/preview')] public function getPreviewByFileId( int $fileId = -1, int $x = 32, -- cgit v1.2.3