summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Application.php9
-rw-r--r--core/Controller/JsController.php7
2 files changed, 4 insertions, 12 deletions
diff --git a/core/Application.php b/core/Application.php
index 6fa301e5906..dad7546dcb8 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -30,7 +30,6 @@
namespace OC\Core;
-use OC\Core\Controller\JsController;
use OC\Security\IdentityProof\Manager;
use OCP\AppFramework\App;
use OC\Core\Controller\CssController;
@@ -67,13 +66,5 @@ class Application extends App {
$container->query(ITimeFactory::class)
);
});
- $container->registerService(JsController::class, function () use ($container) {
- return new JsController(
- $container->query('AppName'),
- $container->query(IRequest::class),
- $container->getServer()->getAppDataDir('js'),
- $container->query(ITimeFactory::class)
- );
- });
}
}
diff --git a/core/Controller/JsController.php b/core/Controller/JsController.php
index c7c9dea9101..1a025edbcad 100644
--- a/core/Controller/JsController.php
+++ b/core/Controller/JsController.php
@@ -22,6 +22,7 @@
*/
namespace OC\Core\Controller;
+use OC\Files\AppData\Factory;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\NotFoundResponse;
@@ -44,13 +45,13 @@ class JsController extends Controller {
/**
* @param string $appName
* @param IRequest $request
- * @param IAppData $appData
+ * @param Factory $appDataFactory
* @param ITimeFactory $timeFactory
*/
- public function __construct($appName, IRequest $request, IAppData $appData, ITimeFactory $timeFactory) {
+ public function __construct($appName, IRequest $request, Factory $appDataFactory, ITimeFactory $timeFactory) {
parent::__construct($appName, $request);
- $this->appData = $appData;
+ $this->appData = $appDataFactory->get('js');
$this->timeFactory = $timeFactory;
}