From: provokateurin Date: Thu, 14 Nov 2024 10:28:34 +0000 (+0100) Subject: refactor(files_versions): Remove Application::registerRoutes() usage X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=238f5182735cadffb27a9fe168523555ef249277;p=nextcloud-server.git refactor(files_versions): Remove Application::registerRoutes() usage Signed-off-by: provokateurin --- 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', + ], + ], +];