routes.php 2.6 KB

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