routes.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. 'ocs' => [
  83. [
  84. 'name' => 'userTheme#enableTheme',
  85. 'url' => '/api/v1/theme/{themeId}/enable',
  86. 'verb' => 'PUT',
  87. ],
  88. [
  89. 'name' => 'userTheme#disableTheme',
  90. 'url' => '/api/v1/theme/{themeId}',
  91. 'verb' => 'DELETE',
  92. ],
  93. ]
  94. ];