aboutsummaryrefslogtreecommitdiffstats
path: root/ocs/routes.php
diff options
context:
space:
mode:
Diffstat (limited to 'ocs/routes.php')
-rw-r--r--ocs/routes.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/ocs/routes.php b/ocs/routes.php
index 845ee49a46d..567f9ccb23d 100644
--- a/ocs/routes.php
+++ b/ocs/routes.php
@@ -81,3 +81,33 @@ OC_API::register(
'core',
OC_API::USER_AUTH
);
+
+// Server-to-Server Sharing
+$s2s = new \OCA\Files_Sharing\API\Server2Server();
+OC_API::register('post',
+ '/cloud/shares',
+ array($s2s, 'createShare'),
+ 'files_sharing',
+ OC_API::GUEST_AUTH
+);
+
+OC_API::register('post',
+ '/cloud/shares/{id}/accept',
+ array($s2s, 'acceptShare'),
+ 'files_sharing',
+ OC_API::GUEST_AUTH
+);
+
+OC_API::register('post',
+ '/cloud/shares/{id}/decline',
+ array($s2s, 'declineShare'),
+ 'files_sharing',
+ OC_API::GUEST_AUTH
+);
+
+OC_API::register('post',
+ '/cloud/shares/{id}/unshare',
+ array($s2s, 'unshare'),
+ 'files_sharing',
+ OC_API::GUEST_AUTH
+);