Inherit ApiResponse from Response

This commit is contained in:
Philipp 2021-11-21 21:52:36 +01:00
parent 561aba18e3
commit 537b74f307
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
46 changed files with 326 additions and 277 deletions

View file

@ -61,6 +61,6 @@ class Config extends BaseApi
],
];
DI::apiResponse()->exit('config', ['config' => $config], $this->parameters['extension'] ?? null);
$this->response->exit('config', ['config' => $config], $this->parameters['extension'] ?? null);
}
}

View file

@ -31,6 +31,6 @@ class Version extends BaseApi
{
protected function rawContent(array $request = [])
{
DI::apiResponse()->exit('version', ['version' => '0.9.7'], $this->parameters['extension'] ?? null);
$this->response->exit('version', ['version' => '0.9.7'], $this->parameters['extension'] ?? null);
}
}

View file

@ -37,6 +37,6 @@ class Test extends BaseApi
$ok = 'ok';
}
DI::apiResponse()->exit('ok', ['ok' => $ok], $this->parameters['extension'] ?? null);
$this->response->exit('ok', ['ok' => $ok], $this->parameters['extension'] ?? null);
}
}