diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-07-19 14:13:27 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-05 14:17:25 +0200 |
commit | a32caa490474c6b87fd809b3c0e5e409253d09a7 (patch) | |
tree | ce38dcf6bd540c9043abc67ca50d497186672701 /apps/files_sharing/appinfo | |
parent | 84e6b8d9d05f7e481276090101ddf77f1ab3cfdf (diff) | |
download | nextcloud-server-a32caa490474c6b87fd809b3c0e5e409253d09a7.tar.gz nextcloud-server-a32caa490474c6b87fd809b3c0e5e409253d09a7.zip |
Convert Share API to use the 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'), |