routes.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org>
  4. * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
  5. *
  6. * @author Bjoern Schiessle <bjoern@schiessle.org>
  7. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  8. * @author Joas Schilling <coding@schilljs.com>
  9. * @author Julius Haertl <jus@bitgrid.net>
  10. * @author Julius Härtl <jus@bitgrid.net>
  11. * @author Lukas Reschke <lukas@statuscode.ch>
  12. * @author oparoz <owncloud@interfasys.ch>
  13. *
  14. * @license GNU AGPL version 3 or any later version
  15. *
  16. * This program is free software: you can redistribute it and/or modify
  17. * it under the terms of the GNU Affero General Public License as
  18. * published by the Free Software Foundation, either version 3 of the
  19. * License, or (at your option) any later version.
  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
  27. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  28. *
  29. */
  30. return [
  31. 'routes' => [
  32. [
  33. 'name' => 'Theming#updateAppMenu',
  34. 'url' => '/ajax/updateAppMenu',
  35. 'verb' => 'PUT',
  36. ],
  37. [
  38. 'name' => 'Theming#updateStylesheet',
  39. 'url' => '/ajax/updateStylesheet',
  40. 'verb' => 'POST'
  41. ],
  42. [
  43. 'name' => 'Theming#undo',
  44. 'url' => '/ajax/undoChanges',
  45. 'verb' => 'POST'
  46. ],
  47. [
  48. 'name' => 'Theming#undoAll',
  49. 'url' => '/ajax/undoAllChanges',
  50. 'verb' => 'POST'
  51. ],
  52. [
  53. 'name' => 'Theming#uploadImage',
  54. 'url' => '/ajax/uploadImage',
  55. 'verb' => 'POST'
  56. ],
  57. [
  58. 'name' => 'Theming#getThemeStylesheet',
  59. 'url' => '/theme/{themeId}.css',
  60. 'verb' => 'GET',
  61. ],
  62. [
  63. 'name' => 'Theming#getImage',
  64. 'url' => '/image/{key}',
  65. 'verb' => 'GET',
  66. ],
  67. [
  68. 'name' => 'Theming#getManifest',
  69. 'url' => '/manifest/{app}',
  70. 'verb' => 'GET',
  71. 'defaults' => ['app' => 'core']
  72. ],
  73. [
  74. 'name' => 'Icon#getFavicon',
  75. 'url' => '/favicon/{app}',
  76. 'verb' => 'GET',
  77. 'defaults' => ['app' => 'core'],
  78. ],
  79. [
  80. 'name' => 'Icon#getTouchIcon',
  81. 'url' => '/icon/{app}',
  82. 'verb' => 'GET',
  83. 'defaults' => ['app' => 'core'],
  84. ],
  85. [
  86. 'name' => 'Icon#getThemedIcon',
  87. 'url' => '/img/{app}/{image}',
  88. 'verb' => 'GET',
  89. 'requirements' => ['image' => '.+']
  90. ],
  91. [
  92. 'name' => 'userTheme#getBackground',
  93. 'url' => '/background',
  94. 'verb' => 'GET',
  95. ],
  96. [
  97. 'name' => 'userTheme#setBackground',
  98. 'url' => '/background/{type}',
  99. 'verb' => 'POST',
  100. ],
  101. [
  102. 'name' => 'userTheme#deleteBackground',
  103. 'url' => '/background/custom',
  104. 'verb' => 'DELETE',
  105. ],
  106. ],
  107. 'ocs' => [
  108. [
  109. 'name' => 'userTheme#enableTheme',
  110. 'url' => '/api/v1/theme/{themeId}/enable',
  111. 'verb' => 'PUT',
  112. ],
  113. [
  114. 'name' => 'userTheme#disableTheme',
  115. 'url' => '/api/v1/theme/{themeId}',
  116. 'verb' => 'DELETE',
  117. ],
  118. ]
  119. ];