You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

routes.php 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. /** @var Application $application */
  32. $application = \OC::$server->query(Application::class);
  33. $application->registerRoutes(
  34. $this,
  35. [
  36. 'routes' => [
  37. [
  38. 'name' => 'API#getThumbnail',
  39. 'url' => '/api/v1/thumbnail/{x}/{y}/{file}',
  40. 'verb' => 'GET',
  41. 'requirements' => ['file' => '.+']
  42. ],
  43. [
  44. 'name' => 'API#updateFileTags',
  45. 'url' => '/api/v1/files/{path}',
  46. 'verb' => 'POST',
  47. 'requirements' => ['path' => '.+'],
  48. ],
  49. [
  50. 'name' => 'API#getRecentFiles',
  51. 'url' => '/api/v1/recent/',
  52. 'verb' => 'GET'
  53. ],
  54. [
  55. 'name' => 'API#updateFileSorting',
  56. 'url' => '/api/v1/sorting',
  57. 'verb' => 'POST'
  58. ],
  59. [
  60. 'name' => 'API#showHiddenFiles',
  61. 'url' => '/api/v1/showhidden',
  62. 'verb' => 'POST'
  63. ],
  64. [
  65. 'name' => 'API#showGridView',
  66. 'url' => '/api/v1/showgridview',
  67. 'verb' => 'POST'
  68. ],
  69. [
  70. 'name' => 'API#getGridView',
  71. 'url' => '/api/v1/showgridview',
  72. 'verb' => 'GET'
  73. ],
  74. [
  75. 'name' => 'view#index',
  76. 'url' => '/',
  77. 'verb' => 'GET',
  78. ],
  79. [
  80. 'name' => 'ajax#getStorageStats',
  81. 'url' => '/ajax/getstoragestats.php',
  82. 'verb' => 'GET',
  83. ],
  84. [
  85. 'name' => 'API#toggleShowFolder',
  86. 'url' => '/api/v1/toggleShowFolder/{key}',
  87. 'verb' => 'POST'
  88. ],
  89. [
  90. 'name' => 'API#getNodeType',
  91. 'url' => '/api/v1/quickaccess/get/NodeType',
  92. 'verb' => 'GET',
  93. ],
  94. [
  95. 'name' => 'DirectEditingView#edit',
  96. 'url' => '/directEditing/{token}',
  97. 'verb' => 'GET'
  98. ],
  99. ],
  100. 'ocs' => [
  101. [
  102. 'name' => 'DirectEditing#info',
  103. 'url' => '/api/v1/directEditing',
  104. 'verb' => 'GET'
  105. ],
  106. [
  107. 'name' => 'DirectEditing#templates',
  108. 'url' => '/api/v1/directEditing/templates/{editorId}/{creatorId}',
  109. 'verb' => 'GET'
  110. ],
  111. [
  112. 'name' => 'DirectEditing#open',
  113. 'url' => '/api/v1/directEditing/open',
  114. 'verb' => 'POST'
  115. ],
  116. [
  117. 'name' => 'DirectEditing#create',
  118. 'url' => '/api/v1/directEditing/create',
  119. 'verb' => 'POST'
  120. ],
  121. [
  122. 'name' => 'TransferOwnership#transfer',
  123. 'url' => '/api/v1/transferownership',
  124. 'verb' => 'POST',
  125. ],
  126. [
  127. 'name' => 'TransferOwnership#accept',
  128. 'url' => '/api/v1/transferownership/{id}',
  129. 'verb' => 'POST',
  130. ],
  131. [
  132. 'name' => 'TransferOwnership#reject',
  133. 'url' => '/api/v1/transferownership/{id}',
  134. 'verb' => 'DELETE',
  135. ],
  136. ],
  137. ]
  138. );
  139. /** @var $this \OC\Route\Router */
  140. $this->create('files_ajax_download', 'ajax/download.php')
  141. ->actionInclude('files/ajax/download.php');
  142. $this->create('files_ajax_list', 'ajax/list.php')
  143. ->actionInclude('files/ajax/list.php');