diff options
Diffstat (limited to 'lib/Controller/UtilityApiController.php')
-rw-r--r-- | lib/Controller/UtilityApiController.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/Controller/UtilityApiController.php b/lib/Controller/UtilityApiController.php index ee9ca0900..23956f149 100644 --- a/lib/Controller/UtilityApiController.php +++ b/lib/Controller/UtilityApiController.php @@ -15,18 +15,17 @@ namespace OCA\News\Controller; +use OCA\News\Service\UpdaterService; use \OCP\IRequest; use \OCP\IConfig; use \OCP\IUserSession; -use \OCP\AppFramework\Http; -use \OCA\News\Utility\Updater; use \OCA\News\Service\StatusService; class UtilityApiController extends ApiController { - private $updater; + private $updaterService; private $settings; private $statusService; @@ -34,12 +33,12 @@ class UtilityApiController extends ApiController $appName, IRequest $request, IUserSession $userSession, - Updater $updater, + UpdaterService $updater, IConfig $settings, StatusService $statusService ) { parent::__construct($appName, $request, $userSession); - $this->updater = $updater; + $this->updaterService = $updater; $this->settings = $settings; $this->statusService = $statusService; } @@ -50,7 +49,7 @@ class UtilityApiController extends ApiController * @NoCSRFRequired * @CORS */ - public function version() + public function version(): array { $version = $this->settings->getAppValue( $this->appName, @@ -64,9 +63,9 @@ class UtilityApiController extends ApiController * @NoCSRFRequired * @CORS */ - public function beforeUpdate() + public function beforeUpdate(): void { - $this->updater->beforeUpdate(); + $this->updaterService->beforeUpdate(); } @@ -74,9 +73,9 @@ class UtilityApiController extends ApiController * @NoCSRFRequired * @CORS */ - public function afterUpdate() + public function afterUpdate(): void { - $this->updater->afterUpdate(); + $this->updaterService->afterUpdate(); } @@ -85,7 +84,7 @@ class UtilityApiController extends ApiController * @NoCSRFRequired * @NoAdminRequired */ - public function status() + public function status(): array { return $this->statusService->getStatus(); } |