routes.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 <vincent@nextcloud.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. $this->create('files_external_oauth1', 'apps/files_external/ajax/oauth1.php')
  30. ->actionInclude('files_external/ajax/oauth1.php');
  31. $this->create('files_external_oauth2', 'apps/files_external/ajax/oauth2.php')
  32. ->actionInclude('files_external/ajax/oauth2.php');
  33. $this->create('files_external_list_applicable', '/apps/files_external/applicable')
  34. ->actionInclude('files_external/ajax/applicable.php');
  35. return [
  36. 'resources' => [
  37. 'global_storages' => ['url' => '/globalstorages'],
  38. 'user_storages' => ['url' => '/userstorages'],
  39. 'user_global_storages' => ['url' => '/userglobalstorages'],
  40. ],
  41. 'routes' => [
  42. [
  43. 'name' => 'Ajax#getSshKeys',
  44. 'url' => '/ajax/public_key.php',
  45. 'verb' => 'POST',
  46. 'requirements' => [],
  47. ],
  48. [
  49. 'name' => 'Ajax#saveGlobalCredentials',
  50. 'url' => '/globalcredentials',
  51. 'verb' => 'POST',
  52. ],
  53. ],
  54. 'ocs' => [
  55. [
  56. 'name' => 'Api#getUserMounts',
  57. 'url' => '/api/v1/mounts',
  58. 'verb' => 'GET',
  59. ],
  60. ],
  61. ];