diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-10-17 09:43:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-17 09:43:57 +0200 |
commit | 07dffb6df6fbf019cc668c716a95cf9e94e49f04 (patch) | |
tree | 4829b7bc58f879f23c12bab2475204429fd47914 /apps/files_sharing | |
parent | e57feec833d892f67364730b911f0f03e6fbda33 (diff) | |
parent | 4a2f9fab66b714c45ea430b33c88a65a8402b459 (diff) | |
download | nextcloud-server-07dffb6df6fbf019cc668c716a95cf9e94e49f04.tar.gz nextcloud-server-07dffb6df6fbf019cc668c716a95cf9e94e49f04.zip |
Merge pull request #17569 from nextcloud/td/di/middleware
Allow DI in middleware
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 195d56f3539..d1c5294dae9 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -127,13 +127,6 @@ class Application extends App { ); }); - $container->registerService('OCSShareAPIMiddleware', function (SimpleContainer $c) use ($server) { - return new OCSShareAPIMiddleware( - $server->getShareManager(), - $server->getL10N($c->query('AppName')) - ); - }); - $container->registerService(ShareInfoMiddleware::class, function () use ($server) { return new ShareInfoMiddleware( $server->getShareManager() @@ -142,7 +135,7 @@ class Application extends App { // Execute middlewares $container->registerMiddleWare('SharingCheckMiddleware'); - $container->registerMiddleWare('OCSShareAPIMiddleware'); + $container->registerMiddleWare(OCSShareAPIMiddleware::class); $container->registerMiddleWare(ShareInfoMiddleware::class); $container->registerService('MountProvider', function (IContainer $c) { |