1
0

routes.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2016, ownCloud, Inc.
  5. *
  6. * @author Bart Visscher <bartv@thisnet.nl>
  7. * @author Christoph Wurst <christoph@owncloud.com>
  8. * @author Lukas Reschke <lukas@statuscode.ch>
  9. * @author Robin Appelman <robin@icewind.nl>
  10. * @author Roeland Jago Douma <roeland@famdouma.nl>
  11. * @author Tobias Kaminsky <tobias@kaminsky.me>
  12. * @author Tom Needham <tom@owncloud.com>
  13. * @author Vincent Petry <pvince81@owncloud.com>
  14. *
  15. * @license AGPL-3.0
  16. *
  17. * This code is free software: you can redistribute it and/or modify
  18. * it under the terms of the GNU Affero General Public License, version 3,
  19. * as published by the Free Software Foundation.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU Affero General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU Affero General Public License, version 3,
  27. * along with this program. If not, see <http://www.gnu.org/licenses/>
  28. *
  29. */
  30. namespace OCA\Files\AppInfo;
  31. $application = new Application();
  32. $application->registerRoutes(
  33. $this,
  34. [
  35. 'routes' => [
  36. [
  37. 'name' => 'API#getThumbnail',
  38. 'url' => '/api/v1/thumbnail/{x}/{y}/{file}',
  39. 'verb' => 'GET',
  40. 'requirements' => ['file' => '.+']
  41. ],
  42. [
  43. 'name' => 'API#updateFileTags',
  44. 'url' => '/api/v1/files/{path}',
  45. 'verb' => 'POST',
  46. 'requirements' => ['path' => '.+'],
  47. ],
  48. [
  49. 'name' => 'API#getRecentFiles',
  50. 'url' => '/api/v1/recent/',
  51. 'verb' => 'GET'
  52. ],
  53. [
  54. 'name' => 'API#updateFileSorting',
  55. 'url' => '/api/v1/sorting',
  56. 'verb' => 'POST'
  57. ],
  58. [
  59. 'name' => 'API#showHiddenFiles',
  60. 'url' => '/api/v1/showhidden',
  61. 'verb' => 'POST'
  62. ],
  63. [
  64. 'name' => 'API#showGridView',
  65. 'url' => '/api/v1/showgridview',
  66. 'verb' => 'POST'
  67. ],
  68. [
  69. 'name' => 'API#getGridView',
  70. 'url' => '/api/v1/showgridview',
  71. 'verb' => 'GET'
  72. ],
  73. [
  74. 'name' => 'view#index',
  75. 'url' => '/',
  76. 'verb' => 'GET',
  77. ],
  78. [
  79. 'name' => 'ajax#getStorageStats',
  80. 'url' => '/ajax/getstoragestats.php',
  81. 'verb' => 'GET',
  82. ],
  83. [
  84. 'name' => 'API#toggleShowFolder',
  85. 'url' => '/api/v1/toggleShowFolder/{key}',
  86. 'verb' => 'POST'
  87. ],
  88. [
  89. 'name' => 'API#getNodeType',
  90. 'url' => '/api/v1/quickaccess/get/NodeType',
  91. 'verb' => 'GET',
  92. ],
  93. ]
  94. ]
  95. );
  96. /** @var $this \OC\Route\Router */
  97. $this->create('files_ajax_download', 'ajax/download.php')
  98. ->actionInclude('files/ajax/download.php');
  99. $this->create('files_ajax_list', 'ajax/list.php')
  100. ->actionInclude('files/ajax/list.php');