summaryrefslogtreecommitdiffstats
path: root/lib/private/App/AppStore/Fetcher/AppFetcher.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/App/AppStore/Fetcher/AppFetcher.php')
-rw-r--r--lib/private/App/AppStore/Fetcher/AppFetcher.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php
index b8efdef4336..9ebc12dbc27 100644
--- a/lib/private/App/AppStore/Fetcher/AppFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php
@@ -28,9 +28,6 @@ use OCP\Http\Client\IClientService;
use OCP\IConfig;
class AppFetcher extends Fetcher {
- /** @var IConfig */
- private $config;
-
/**
* @param IAppData $appData
* @param IClientService $clientService
@@ -44,11 +41,11 @@ class AppFetcher extends Fetcher {
parent::__construct(
$appData,
$clientService,
- $timeFactory
+ $timeFactory,
+ $config
);
$this->fileName = 'apps.json';
- $this->config = $config;
$versionArray = explode('.', $this->config->getSystemValue('version'));
$this->endpointUrl = sprintf(
@@ -65,12 +62,8 @@ class AppFetcher extends Fetcher {
* @return array
*/
protected function fetch() {
- $client = $this->clientService->newClient();
- $response = $client->get($this->endpointUrl);
- $responseJson = [];
- $responseJson['data'] = json_decode($response->getBody(), true);
- $responseJson['timestamp'] = $this->timeFactory->getTime();
- $response = $responseJson;
+ /** @var mixed[] $response */
+ $response = parent::fetch();
$ncVersion = $this->config->getSystemValue('version');
$ncMajorVersion = explode('.', $ncVersion)[0];