ObjectController: reasonable defaults for REST PUT
This commit is contained in:
parent
037b3178a0
commit
2d826ba939
|
@ -252,6 +252,13 @@ abstract class ObjectController extends ActionController
|
||||||
if ($request->getMethod() === 'POST') {
|
if ($request->getMethod() === 'POST') {
|
||||||
$object->setProperties($data);
|
$object->setProperties($data);
|
||||||
} else {
|
} else {
|
||||||
|
$data = array_merge(
|
||||||
|
array(
|
||||||
|
'object_type' => $object->object_type,
|
||||||
|
'object_name' => $object->object_name
|
||||||
|
),
|
||||||
|
$data
|
||||||
|
);
|
||||||
$object->replaceWith(
|
$object->replaceWith(
|
||||||
IcingaObject::createByType($type, $data, $db)
|
IcingaObject::createByType($type, $data, $db)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue