Move over OCSShareAPIMIddleware to pure DI
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
098ab7af4b
commit
4a2f9fab66
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue