routes.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /** @var $this \OCP\Route\IRouter */
  3. $this->create('core_ajax_public_preview', '/publicpreview')->action(
  4. function() {
  5. require_once __DIR__ . '/../ajax/publicpreview.php';
  6. });
  7. $this->create('files_sharing_ajax_list', 'ajax/list.php')
  8. ->actionInclude('files_sharing/ajax/list.php');
  9. $this->create('files_sharing_ajax_publicpreview', 'ajax/publicpreview.php')
  10. ->actionInclude('files_sharing/ajax/publicpreview.php');
  11. $this->create('sharing_external_shareinfo', '/shareinfo')
  12. ->actionInclude('files_sharing/ajax/shareinfo.php');
  13. $this->create('sharing_external_add', '/external')
  14. ->actionInclude('files_sharing/ajax/external.php');
  15. $this->create('sharing_external_test_remote', '/testremote')
  16. ->actionInclude('files_sharing/ajax/testremote.php');
  17. // OCS API
  18. //TODO: SET: mail notification, waiting for PR #4689 to be accepted
  19. OC_API::register('get',
  20. '/apps/files_sharing/api/v1/shares',
  21. array('\OCA\Files\Share\Api', 'getAllShares'),
  22. 'files_sharing');
  23. OC_API::register('post',
  24. '/apps/files_sharing/api/v1/shares',
  25. array('\OCA\Files\Share\Api', 'createShare'),
  26. 'files_sharing');
  27. OC_API::register('get',
  28. '/apps/files_sharing/api/v1/shares/{id}',
  29. array('\OCA\Files\Share\Api', 'getShare'),
  30. 'files_sharing');
  31. OC_API::register('put',
  32. '/apps/files_sharing/api/v1/shares/{id}',
  33. array('\OCA\Files\Share\Api', 'updateShare'),
  34. 'files_sharing');
  35. OC_API::register('delete',
  36. '/apps/files_sharing/api/v1/shares/{id}',
  37. array('\OCA\Files\Share\Api', 'deleteShare'),
  38. 'files_sharing');