diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-08-08 14:59:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-08 14:59:59 +0200 |
commit | 70eef2a82e1f7a08e8783af16927c21e59d71ccb (patch) | |
tree | 83a6d711904048622e4f211bbde39fe3f7220402 /apps/files_sharing/appinfo | |
parent | e4436e46cb38675fc14b608af094e4e3b5fa7c19 (diff) | |
parent | dd9f195afd242c3d6023e8b6afecb73a61a99d60 (diff) | |
download | nextcloud-server-70eef2a82e1f7a08e8783af16927c21e59d71ccb.tar.gz nextcloud-server-70eef2a82e1f7a08e8783af16927c21e59d71ccb.zip |
Merge pull request #445 from nextcloud/ocs_share_to_appframework
OCS Share API to appframework
Diffstat (limited to 'apps/files_sharing/appinfo')
-rw-r--r-- | apps/files_sharing/appinfo/routes.php | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index 92c2759ed14..ee7ea55d506 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -40,6 +40,36 @@ $application->registerRoutes($this, [ 'verb' => 'GET' ], ], + 'ocs' => [ + /* + * OCS Share API + */ + [ + 'name' => 'ShareAPI#getShares', + 'url' => '/api/v1/shares', + 'verb' => 'GET', + ], + [ + 'name' => 'ShareAPI#createShare', + 'url' => '/api/v1/shares', + 'verb' => 'POST', + ], + [ + 'name' => 'ShareAPI#getShare', + 'url' => '/api/v1/shares/{id}', + 'verb' => 'GET', + ], + [ + 'name' => 'ShareAPI#updateShare', + 'url' => '/api/v1/shares/{id}', + 'verb' => 'PUT', + ], + [ + 'name' => 'ShareAPI#deleteShare', + 'url' => '/api/v1/shares/{id}', + 'verb' => 'DELETE', + ], + ], ]); /** @var $this \OCP\Route\IRouter */ @@ -59,33 +89,6 @@ $this->create('sharing_external_shareinfo', '/shareinfo') //TODO: SET: mail notification, waiting for PR #4689 to be accepted -$OCSShare = new \OCA\Files_Sharing\API\OCSShareWrapper(); - -API::register('get', - '/apps/files_sharing/api/v1/shares', - [$OCSShare, 'getAllShares'], - 'files_sharing'); - -API::register('post', - '/apps/files_sharing/api/v1/shares', - [$OCSShare, 'createShare'], - 'files_sharing'); - -API::register('get', - '/apps/files_sharing/api/v1/shares/{id}', - [$OCSShare, 'getShare'], - 'files_sharing'); - -API::register('put', - '/apps/files_sharing/api/v1/shares/{id}', - [$OCSShare, 'updateShare'], - 'files_sharing'); - -API::register('delete', - '/apps/files_sharing/api/v1/shares/{id}', - [$OCSShare, 'deleteShare'], - 'files_sharing'); - API::register('get', '/apps/files_sharing/api/v1/remote_shares', array('\OCA\Files_Sharing\API\Remote', 'getShares'), |