routes.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. * @copyright Copyright (c) 2016, Roeland Jago Douma <roeland@famdouma.nl>
  5. *
  6. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  7. * @author Lukas Reschke <lukas@statuscode.ch>
  8. * @author Morris Jobke <hey@morrisjobke.de>
  9. * @author Roeland Jago Douma <roeland@famdouma.nl>
  10. * @author Tom Needham <tom@owncloud.com>
  11. *
  12. * @license AGPL-3.0
  13. *
  14. * This code is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU Affero General Public License, version 3,
  16. * as published by the Free Software Foundation.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License, version 3,
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>
  25. *
  26. */
  27. namespace OCA\Files_Versions\AppInfo;
  28. /** @var Application $application */
  29. $application = \OC::$server->query(Application::class);
  30. $application->registerRoutes($this, [
  31. 'routes' => [
  32. [
  33. 'name' => 'Preview#getPreview',
  34. 'url' => '/preview',
  35. 'verb' => 'GET',
  36. ],
  37. ],
  38. ]);
  39. /** @var $this \OCP\Route\IRouter */
  40. $this->create('files_versions_download', 'download.php')
  41. ->actionInclude('files_versions/download.php');
  42. $this->create('files_versions_ajax_getVersions', 'ajax/getVersions.php')
  43. ->actionInclude('files_versions/ajax/getVersions.php');
  44. $this->create('files_versions_ajax_rollbackVersion', 'ajax/rollbackVersion.php')
  45. ->actionInclude('files_versions/ajax/rollbackVersion.php');