mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
ConfigController: use new response handling
This commit is contained in:
parent
427cb2c050
commit
ca1371d8b3
@ -83,7 +83,8 @@ class ConfigController extends ActionController
|
|||||||
protected function deploymentSucceeded($checksum)
|
protected function deploymentSucceeded($checksum)
|
||||||
{
|
{
|
||||||
if ($this->getRequest()->isApiRequest()) {
|
if ($this->getRequest()->isApiRequest()) {
|
||||||
return $this->sendJson((object) array('checksum' => $checksum));
|
$this->sendJson($this->getResponse(), (object) array('checksum' => $checksum));
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
$url = Url::fromPath('director/config/deployments');
|
$url = Url::fromPath('director/config/deployments');
|
||||||
Notification::success(
|
Notification::success(
|
||||||
@ -98,7 +99,8 @@ class ConfigController extends ActionController
|
|||||||
$extra = $error ? ': ' . $error: '';
|
$extra = $error ? ': ' . $error: '';
|
||||||
|
|
||||||
if ($this->getRequest()->isApiRequest()) {
|
if ($this->getRequest()->isApiRequest()) {
|
||||||
return $this->sendJsonError('Config deployment failed' . $extra);
|
$this->sendJsonError($this->getResponse(), 'Config deployment failed' . $extra);
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
$url = Url::fromPath('director/config/files', array('checksum' => $checksum));
|
$url = Url::fromPath('director/config/files', array('checksum' => $checksum));
|
||||||
Notification::error(
|
Notification::error(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user