mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-26 23:34:10 +02:00
CoreApi: return only single element for getObject
This commit is contained in:
parent
23cfbb12a4
commit
a9f2bd8f97
@ -54,7 +54,10 @@ class CoreApi
|
||||
$params->attrs = $attrs;
|
||||
}
|
||||
$url = 'objects/' . urlencode(strtolower($pluraltype)) . '/' . rawurlencode($name) . '?all_joins=1';
|
||||
return $this->client->get($url, $params)->getResult('name');
|
||||
$res = $this->client->get($url, $params)->getResult('name');
|
||||
|
||||
// TODO: check key, throw
|
||||
return $res[$name];
|
||||
}
|
||||
|
||||
public function getConstants()
|
||||
|
Loading…
x
Reference in New Issue
Block a user