Private GIT

Skip to content
Snippets Groups Projects
Commit 89edf938 authored by loiclau's avatar loiclau Committed by Matthieu Kermagoret
Browse files

fix(api rest) existing object

parent 8674dfb8
Branches
Tags
No related merge requests found
...@@ -172,6 +172,9 @@ class CentreonRtDowntime extends CentreonObject ...@@ -172,6 +172,9 @@ class CentreonRtDowntime extends CentreonObject
public function show($parameters = null) public function show($parameters = null)
{ {
if ($parameters !== '') { if ($parameters !== '') {
if ($parameters !== 'HOST' && $parameters !== 'SVC') {
throw new CentreonClapiException(self::OBJECT_NOT_FOUND);
}
$parsedParameters = $this->parseShowparameters($parameters); $parsedParameters = $this->parseShowparameters($parameters);
$method = 'show' . ucfirst($parsedParameters['type']); $method = 'show' . ucfirst($parsedParameters['type']);
$this->$method($parsedParameters['resource']); $this->$method($parsedParameters['resource']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment