From 238f5182735cadffb27a9fe168523555ef249277 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 14 Nov 2024 11:28:34 +0100 Subject: [PATCH] refactor(files_versions): Remove Application::registerRoutes() usage Signed-off-by: provokateurin --- apps/files_versions/appinfo/routes.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/apps/files_versions/appinfo/routes.php b/apps/files_versions/appinfo/routes.php index 09aa3c7a3ec..b7058b222f8 100644 --- a/apps/files_versions/appinfo/routes.php +++ b/apps/files_versions/appinfo/routes.php @@ -8,18 +8,6 @@ namespace OCA\Files_Versions\AppInfo; use OCP\Route\IRouter; -/** @var Application $application */ -$application = \OC::$server->query(Application::class); -$application->registerRoutes($this, [ - 'routes' => [ - [ - 'name' => 'Preview#getPreview', - 'url' => '/preview', - 'verb' => 'GET', - ], - ], -]); - /** @var IRouter $this */ $this->create('files_versions_download', 'apps/files_versions/download.php') ->actionInclude('files_versions/download.php'); @@ -27,3 +15,13 @@ $this->create('files_versions_ajax_getVersions', 'apps/files_versions/ajax/getVe ->actionInclude('files_versions/ajax/getVersions.php'); $this->create('files_versions_ajax_rollbackVersion', 'apps/files_versions/ajax/rollbackVersion.php') ->actionInclude('files_versions/ajax/rollbackVersion.php'); + +return [ + 'routes' => [ + [ + 'name' => 'Preview#getPreview', + 'url' => '/preview', + 'verb' => 'GET', + ], + ], +]; -- 2.39.5