routes.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  7. * @author Morris Jobke <hey@morrisjobke.de>
  8. * @author Robin Appelman <robin@icewind.nl>
  9. * @author Robin McCorkell <robin@mccorkell.me.uk>
  10. * @author Ross Nicoll <jrn@jrn.me.uk>
  11. * @author Vincent Petry <pvince81@owncloud.com>
  12. *
  13. * @license AGPL-3.0
  14. *
  15. * This code is free software: you can redistribute it and/or modify
  16. * it under the terms of the GNU Affero General Public License, version 3,
  17. * as published by the Free Software Foundation.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU Affero General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU Affero General Public License, version 3,
  25. * along with this program. If not, see <http://www.gnu.org/licenses/>
  26. *
  27. */
  28. /**
  29. * @var $this \OCP\Route\IRouter
  30. **/
  31. \OC_Mount_Config::$app->registerRoutes(
  32. $this,
  33. [
  34. 'resources' => [
  35. 'global_storages' => ['url' => '/globalstorages'],
  36. 'user_storages' => ['url' => '/userstorages'],
  37. 'user_global_storages' => ['url' => '/userglobalstorages'],
  38. ],
  39. 'routes' => [
  40. [
  41. 'name' => 'Ajax#getSshKeys',
  42. 'url' => '/ajax/public_key.php',
  43. 'verb' => 'POST',
  44. 'requirements' => [],
  45. ],
  46. [
  47. 'name' => 'Ajax#saveGlobalCredentials',
  48. 'url' => '/globalcredentials',
  49. 'verb' => 'POST',
  50. ],
  51. ],
  52. 'ocs' => [
  53. [
  54. 'name' => 'Api#getUserMounts',
  55. 'url' => '/api/v1/mounts',
  56. 'verb' => 'GET',
  57. ],
  58. ],
  59. ]
  60. );
  61. $this->create('files_external_oauth1', 'ajax/oauth1.php')
  62. ->actionInclude('files_external/ajax/oauth1.php');
  63. $this->create('files_external_oauth2', 'ajax/oauth2.php')
  64. ->actionInclude('files_external/ajax/oauth2.php');
  65. $this->create('files_external_list_applicable', '/applicable')
  66. ->actionInclude('files_external/ajax/applicable.php');