aboutsummaryrefslogtreecommitdiffstats
path: root/core/routes.php
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-04-18 16:05:11 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-02 11:29:27 +0200
commit5cfe20675dfa1f895af47b4a8c93cf479d53b200 (patch)
tree66e0631e2f8791168797a4a7957a420e4ac429cf /core/routes.php
parent22bb834c48ad31add1d4bebc17de98d6e7d5d226 (diff)
downloadnextcloud-server-5cfe20675dfa1f895af47b4a8c93cf479d53b200.tar.gz
nextcloud-server-5cfe20675dfa1f895af47b4a8c93cf479d53b200.zip
start implementing federated sharing 2.0
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'core/routes.php')
-rw-r--r--core/routes.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/core/routes.php b/core/routes.php
index cc1bd34d898..90282c5ebf7 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -107,6 +107,34 @@ $this->create('spreed.pagecontroller.showCall', '/call/{token}')->action(functio
}
});
+// OCM routes
+/**
+ * @suppress PhanUndeclaredClassConstant
+ * @suppress PhanUndeclaredClassMethod
+ */
+$this->create('cloud_federation_api.requesthandlercontroller.addShare', '/ocm/shares')->post()->action(function($urlParams) {
+ if (class_exists(\OCA\CloudFederationAPI\AppInfo\Application::class, false)) {
+ $app = new \OCA\CloudFederationAPI\AppInfo\Application($urlParams);
+ $app->dispatch('RequestHandlerController', 'addShare');
+ } else {
+ throw new \OC\HintException('Cloud Federation API not enabled');
+ }
+});
+
+/**
+ * @suppress PhanUndeclaredClassConstant
+ * @suppress PhanUndeclaredClassMethod
+ */
+$this->create('cloud_federation_api.requesthandlercontroller.receiveNotification', '/ocm/notifications')->post()->action(function($urlParams) {
+ if (class_exists(\OCA\CloudFederationAPI\AppInfo\Application::class, false)) {
+ $app = new \OCA\CloudFederationAPI\AppInfo\Application($urlParams);
+ $app->dispatch('RequestHandlerController', 'receiveNotification');
+ } else {
+ throw new \OC\HintException('Cloud Federation API not enabled');
+ }
+});
+
+
// Sharing routes
$this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(function($urlParams) {
if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {