]> source.dussan.org Git - nextcloud-server.git/commitdiff
refactor(files_versions): Remove Application::registerRoutes() usage
authorprovokateurin <kate@provokateurin.de>
Thu, 14 Nov 2024 10:28:34 +0000 (11:28 +0100)
committerprovokateurin <kate@provokateurin.de>
Thu, 14 Nov 2024 10:28:34 +0000 (11:28 +0100)
Signed-off-by: provokateurin <kate@provokateurin.de>
apps/files_versions/appinfo/routes.php

index 09aa3c7a3ec94a267ff3c5ab464156cb1c11f1fd..b7058b222f8e321848e9488dc00b0b7508dbca07 100644 (file)
@@ -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',
+               ],
+       ],
+];