Move over OCSShareAPIMIddleware to pure DI

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-10-16 22:53:09 +02:00
parent 098ab7af4b
commit 4a2f9fab66
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 8 deletions

View File

@ -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) { $container->registerService(ShareInfoMiddleware::class, function () use ($server) {
return new ShareInfoMiddleware( return new ShareInfoMiddleware(
$server->getShareManager() $server->getShareManager()
@ -142,7 +135,7 @@ class Application extends App {
// Execute middlewares // Execute middlewares
$container->registerMiddleWare('SharingCheckMiddleware'); $container->registerMiddleWare('SharingCheckMiddleware');
$container->registerMiddleWare('OCSShareAPIMiddleware'); $container->registerMiddleWare(OCSShareAPIMiddleware::class);
$container->registerMiddleWare(ShareInfoMiddleware::class); $container->registerMiddleWare(ShareInfoMiddleware::class);
$container->registerService('MountProvider', function (IContainer $c) { $container->registerService('MountProvider', function (IContainer $c) {