mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
ObjectController: REST API 422 was too strict
This commit is contained in:
parent
f971839f82
commit
23b1b008a8
@ -267,11 +267,13 @@ abstract class ObjectController extends ActionController
|
|||||||
$this->db()
|
$this->db()
|
||||||
);
|
);
|
||||||
} elseif ($this->getRequest()->isApiRequest()) {
|
} elseif ($this->getRequest()->isApiRequest()) {
|
||||||
$this->getResponse()->setHttpResponseCode(422);
|
if ($this->getRequest()->isGet()) {
|
||||||
|
$this->getResponse()->setHttpResponseCode(422);
|
||||||
|
|
||||||
throw new InvalidPropertyException(
|
throw new InvalidPropertyException(
|
||||||
'Cannot load object, missing parameters'
|
'Cannot load object, missing parameters'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->undeployedChanges = $this->countUndeployedChanges();
|
$this->view->undeployedChanges = $this->countUndeployedChanges();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user