summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/appinfo/routes.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-09-02 19:28:42 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-09-09 07:40:33 +0200
commitba104233b0dac2924761febf5ba16de68513be5a (patch)
tree4f62509d11dd0f6691a6d5ef741d075242ba99e7 /apps/files_sharing/appinfo/routes.php
parentf5aafdc89789623e72f9a05ecc2629ed2894668b (diff)
downloadnextcloud-server-ba104233b0dac2924761febf5ba16de68513be5a.tar.gz
nextcloud-server-ba104233b0dac2924761febf5ba16de68513be5a.zip
Move remote_shares OCS endpoint to AppFramework
Diffstat (limited to 'apps/files_sharing/appinfo/routes.php')
-rw-r--r--apps/files_sharing/appinfo/routes.php63
1 files changed, 33 insertions, 30 deletions
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php
index de6967c7d63..267e53829da 100644
--- a/apps/files_sharing/appinfo/routes.php
+++ b/apps/files_sharing/appinfo/routes.php
@@ -77,6 +77,39 @@ $application->registerRoutes($this, [
'url' => '/api/v1/sharees',
'verb' => 'GET',
],
+ /*
+ * Remote Shares
+ */
+ [
+ 'name' => 'Remote#getShares',
+ 'url' => '/api/v1/remote_shares',
+ 'verb' => 'GET',
+ ],
+ [
+ 'name' => 'Remote#getOpenShares',
+ 'url' => '/api/v1/remote_shares/pending',
+ 'verb' => 'GET',
+ ],
+ [
+ 'name' => 'Remote#acceptShare',
+ 'url' => '/api/v1/remote_shares/pending/{id}',
+ 'verb' => 'POST',
+ ],
+ [
+ 'name' => 'Remote#declineShare',
+ 'url' => '/api/v1/remote_shares/pending/{id}',
+ 'verb' => 'DELETE',
+ ],
+ [
+ 'name' => 'Remote#getShare',
+ 'url' => '/api/v1/remote_shares/{id}',
+ 'verb' => 'GET',
+ ],
+ [
+ 'name' => 'Remote#unshare',
+ 'url' => '/api/v1/remote_shares/{id}',
+ 'verb' => 'DELETE',
+ ],
],
]);
@@ -96,33 +129,3 @@ $this->create('sharing_external_shareinfo', '/shareinfo')
// OCS API
//TODO: SET: mail notification, waiting for PR #4689 to be accepted
-
-API::register('get',
- '/apps/files_sharing/api/v1/remote_shares',
- array('\OCA\Files_Sharing\API\Remote', 'getShares'),
- 'files_sharing');
-
-API::register('get',
- '/apps/files_sharing/api/v1/remote_shares/pending',
- array('\OCA\Files_Sharing\API\Remote', 'getOpenShares'),
- 'files_sharing');
-
-API::register('post',
- '/apps/files_sharing/api/v1/remote_shares/pending/{id}',
- array('\OCA\Files_Sharing\API\Remote', 'acceptShare'),
- 'files_sharing');
-
-API::register('delete',
- '/apps/files_sharing/api/v1/remote_shares/pending/{id}',
- array('\OCA\Files_Sharing\API\Remote', 'declineShare'),
- 'files_sharing');
-
-API::register('get',
- '/apps/files_sharing/api/v1/remote_shares/{id}',
- array('\OCA\Files_Sharing\API\Remote', 'getShare'),
- 'files_sharing');
-
-API::register('delete',
- '/apps/files_sharing/api/v1/remote_shares/{id}',
- array('\OCA\Files_Sharing\API\Remote', 'unshare'),
- 'files_sharing');