routes.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. array(
  34. 'resources' => array(
  35. 'global_storages' => array('url' => '/globalstorages'),
  36. 'user_storages' => array('url' => '/userstorages'),
  37. 'user_global_storages' => array('url' => '/userglobalstorages'),
  38. ),
  39. 'routes' => array(
  40. array(
  41. 'name' => 'Ajax#getSshKeys',
  42. 'url' => '/ajax/public_key.php',
  43. 'verb' => 'POST',
  44. 'requirements' => array()
  45. ),
  46. [
  47. 'name' => 'Ajax#saveGlobalCredentials',
  48. 'url' => '/globalcredentials',
  49. 'verb' => 'POST',
  50. ],
  51. )
  52. )
  53. );
  54. $this->create('files_external_oauth1', 'ajax/oauth1.php')
  55. ->actionInclude('files_external/ajax/oauth1.php');
  56. $this->create('files_external_oauth2', 'ajax/oauth2.php')
  57. ->actionInclude('files_external/ajax/oauth2.php');
  58. $this->create('files_external_list_applicable', '/applicable')
  59. ->actionInclude('files_external/ajax/applicable.php');
  60. \OCP\API::register('get',
  61. '/apps/files_external/api/v1/mounts',
  62. array('\OCA\Files_External\Lib\Api', 'getUserMounts'),
  63. 'files_external');