summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/AppInfo/Application.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-07-25 22:25:23 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-08-10 13:49:09 +0200
commitc9d2e31d527190660c51a75741747178f029091c (patch)
tree71aad956d8da297a96861bd9ad685f6250bb7d95 /apps/files_sharing/lib/AppInfo/Application.php
parent8a539ec0f6dc1650902a9340197d62688164d462 (diff)
downloadnextcloud-server-c9d2e31d527190660c51a75741747178f029091c.tar.gz
nextcloud-server-c9d2e31d527190660c51a75741747178f029091c.zip
Remove old code + add Middleware
* Add proper middleware for shareinfo * Remove old shareinfo routes Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib/AppInfo/Application.php')
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index db2175c3445..3e95c738df8 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -28,6 +28,7 @@
namespace OCA\Files_Sharing\AppInfo;
use OCA\Files_Sharing\Middleware\OCSShareAPIMiddleware;
+use OCA\Files_Sharing\Middleware\ShareInfoMiddleware;
use OCA\Files_Sharing\MountProvider;
use OCP\AppFramework\App;
use OC\AppFramework\Utility\SimpleContainer;
@@ -124,9 +125,16 @@ class Application extends App {
);
});
+ $container->registerService(ShareInfoMiddleware::class, function () use ($server) {
+ return new ShareInfoMiddleware(
+ $server->getShareManager()
+ );
+ });
+
// Execute middlewares
$container->registerMiddleWare('SharingCheckMiddleware');
$container->registerMiddleWare('OCSShareAPIMiddleware');
+ $container->registerMiddleWare(ShareInfoMiddleware::class);
$container->registerService('MountProvider', function (IContainer $c) {
/** @var \OCP\IServerContainer $server */