ConfigController: use new response handling

This commit is contained in:
Thomas Gelf 2017-07-06 21:32:06 +02:00
parent 427cb2c050
commit ca1371d8b3
1 changed files with 4 additions and 2 deletions

View File

@ -83,7 +83,8 @@ class ConfigController extends ActionController
protected function deploymentSucceeded($checksum)
{
if ($this->getRequest()->isApiRequest()) {
return $this->sendJson((object) array('checksum' => $checksum));
$this->sendJson($this->getResponse(), (object) array('checksum' => $checksum));
return;
} else {
$url = Url::fromPath('director/config/deployments');
Notification::success(
@ -98,7 +99,8 @@ class ConfigController extends ActionController
$extra = $error ? ': ' . $error: '';
if ($this->getRequest()->isApiRequest()) {
return $this->sendJsonError('Config deployment failed' . $extra);
$this->sendJsonError($this->getResponse(), 'Config deployment failed' . $extra);
return;
} else {
$url = Url::fromPath('director/config/files', array('checksum' => $checksum));
Notification::error(