routes.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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#updateStylesheet',
  34. 'url' => '/ajax/updateStylesheet',
  35. 'verb' => 'POST'
  36. ],
  37. [
  38. 'name' => 'Theming#undo',
  39. 'url' => '/ajax/undoChanges',
  40. 'verb' => 'POST'
  41. ],
  42. [
  43. 'name' => 'Theming#undoAll',
  44. 'url' => '/ajax/undoAllChanges',
  45. 'verb' => 'POST'
  46. ],
  47. [
  48. 'name' => 'Theming#uploadImage',
  49. 'url' => '/ajax/uploadImage',
  50. 'verb' => 'POST'
  51. ],
  52. [
  53. 'name' => 'Theming#getThemeStylesheet',
  54. 'url' => '/theme/{themeId}.css',
  55. 'verb' => 'GET',
  56. ],
  57. [
  58. 'name' => 'Theming#getImage',
  59. 'url' => '/image/{key}',
  60. 'verb' => 'GET',
  61. ],
  62. [
  63. 'name' => 'Theming#getManifest',
  64. 'url' => '/manifest/{app}',
  65. 'verb' => 'GET',
  66. 'defaults' => ['app' => 'core']
  67. ],
  68. [
  69. 'name' => 'Icon#getFavicon',
  70. 'url' => '/favicon/{app}',
  71. 'verb' => 'GET',
  72. 'defaults' => ['app' => 'core'],
  73. ],
  74. [
  75. 'name' => 'Icon#getTouchIcon',
  76. 'url' => '/icon/{app}',
  77. 'verb' => 'GET',
  78. 'defaults' => ['app' => 'core'],
  79. ],
  80. [
  81. 'name' => 'Icon#getThemedIcon',
  82. 'url' => '/img/{app}/{image}',
  83. 'verb' => 'GET',
  84. 'requirements' => ['image' => '.+']
  85. ],
  86. [
  87. 'name' => 'userTheme#getBackground',
  88. 'url' => '/background',
  89. 'verb' => 'GET',
  90. ],
  91. [
  92. 'name' => 'userTheme#setBackground',
  93. 'url' => '/background/{type}',
  94. 'verb' => 'POST',
  95. ],
  96. [
  97. 'name' => 'userTheme#deleteBackground',
  98. 'url' => '/background/custom',
  99. 'verb' => 'DELETE',
  100. ],
  101. ],
  102. 'ocs' => [
  103. [
  104. 'name' => 'userTheme#enableTheme',
  105. 'url' => '/api/v1/theme/{themeId}/enable',
  106. 'verb' => 'PUT',
  107. ],
  108. [
  109. 'name' => 'userTheme#disableTheme',
  110. 'url' => '/api/v1/theme/{themeId}',
  111. 'verb' => 'DELETE',
  112. ],
  113. ]
  114. ];