diff options
Diffstat (limited to 'apps/files_sharing/appinfo/routes.php')
-rw-r--r-- | apps/files_sharing/appinfo/routes.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index 41bdf554fc5..dd9509575b7 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -1,5 +1,16 @@ <?php +namespace OCA\Files_Sharing\AppInfo; + +use OCA\Files_Sharing\Application; + +$application = new Application(); +$application->registerRoutes($this, [ + 'resources' => [ + 'ExternalShares' => ['url' => '/api/externalShares'], + ] +]); + /** @var $this \OCP\Route\IRouter */ $this->create('core_ajax_public_preview', '/publicpreview')->action( function() { @@ -16,31 +27,32 @@ $this->create('sharing_external_add', '/external') ->actionInclude('files_sharing/ajax/external.php'); $this->create('sharing_external_test_remote', '/testremote') ->actionInclude('files_sharing/ajax/testremote.php'); + // OCS API //TODO: SET: mail notification, waiting for PR #4689 to be accepted -OC_API::register('get', +\OC_API::register('get', '/apps/files_sharing/api/v1/shares', array('\OCA\Files_Sharing\API\Local', 'getAllShares'), 'files_sharing'); -OC_API::register('post', +\OC_API::register('post', '/apps/files_sharing/api/v1/shares', array('\OCA\Files_Sharing\API\Local', 'createShare'), 'files_sharing'); -OC_API::register('get', +\OC_API::register('get', '/apps/files_sharing/api/v1/shares/{id}', array('\OCA\Files_Sharing\API\Local', 'getShare'), 'files_sharing'); -OC_API::register('put', +\OC_API::register('put', '/apps/files_sharing/api/v1/shares/{id}', array('\OCA\Files_Sharing\API\Local', 'updateShare'), 'files_sharing'); -OC_API::register('delete', +\OC_API::register('delete', '/apps/files_sharing/api/v1/shares/{id}', array('\OCA\Files_Sharing\API\Local', 'deleteShare'), 'files_sharing'); |