routes.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  4. * @author Morris Jobke <hey@morrisjobke.de>
  5. * @author Ross Nicoll <jrn@jrn.me.uk>
  6. * @author Vincent Petry <pvince81@owncloud.com>
  7. *
  8. * @copyright Copyright (c) 2015, ownCloud, Inc.
  9. * @license AGPL-3.0
  10. *
  11. * This code is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License, version 3,
  13. * as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License, version 3,
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>
  22. *
  23. */
  24. namespace OCA\Files_External\Appinfo;
  25. /**
  26. * @var $this \OC\Route\Router
  27. **/
  28. $application = new Application();
  29. $application->registerRoutes(
  30. $this,
  31. array(
  32. 'resources' => array(
  33. 'global_storages' => array('url' => '/globalstorages'),
  34. 'user_storages' => array('url' => '/userstorages'),
  35. ),
  36. 'routes' => array(
  37. array(
  38. 'name' => 'Ajax#getSshKeys',
  39. 'url' => '/ajax/sftp_key.php',
  40. 'verb' => 'POST',
  41. 'requirements' => array()
  42. )
  43. )
  44. )
  45. );
  46. // TODO: move these to app framework
  47. $this->create('files_external_add_root_certificate', 'ajax/addRootCertificate.php')
  48. ->actionInclude('files_external/ajax/addRootCertificate.php');
  49. $this->create('files_external_remove_root_certificate', 'ajax/removeRootCertificate.php')
  50. ->actionInclude('files_external/ajax/removeRootCertificate.php');
  51. $this->create('files_external_dropbox', 'ajax/dropbox.php')
  52. ->actionInclude('files_external/ajax/dropbox.php');
  53. $this->create('files_external_google', 'ajax/google.php')
  54. ->actionInclude('files_external/ajax/google.php');
  55. $this->create('files_external_list_applicable', '/applicable')
  56. ->actionInclude('files_external/ajax/applicable.php');
  57. \OC_API::register('get',
  58. '/apps/files_external/api/v1/mounts',
  59. array('\OCA\Files\External\Api', 'getUserMounts'),
  60. 'files_external');