diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2018-04-18 17:05:11 +0300 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2018-07-02 12:29:27 +0300 |
commit | 5cfe20675dfa1f895af47b4a8c93cf479d53b200 (patch) | |
tree | 66e0631e2f8791168797a4a7957a420e4ac429cf /core/routes.php | |
parent | 22bb834c48ad31add1d4bebc17de98d6e7d5d226 (diff) |
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.php | 28 |
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)) { |