1
0

routes.php 2.1 KB

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