Skip to content

Commit 0cccef9

Browse files
Improve parameters for newer 'save' action
1 parent f3a0e48 commit 0cccef9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/CMDBCategory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function save(int $objectID, string $categoryConstant, array $attributes,
9494
*/
9595
public function create(int $objectID, string $categoryConst, array $attributes): int {
9696
$params = [
97-
'objID' => $objectID,
97+
'object' => $objectID,
9898
'data' => $attributes,
9999
'category' => $categoryConst
100100
];
@@ -219,7 +219,7 @@ public function update(int $objectID, string $categoryConst, array $attributes,
219219
$result = $this->api->request(
220220
'cmdb.category.save',
221221
[
222-
'objID' => $objectID,
222+
'object' => $objectID,
223223
'category' => $categoryConst,
224224
'data' => $attributes
225225
]
@@ -376,7 +376,7 @@ public function batchCreate(array $objectIDs, string $categoryConst, array $attr
376376
foreach ($objectIDs as $objectID) {
377377
foreach ($attributes as $data) {
378378
$params = [
379-
'objID' => $objectID,
379+
'object' => $objectID,
380380
'data' => $data,
381381
'category' => $categoryConst
382382
];
@@ -495,7 +495,7 @@ public function batchUpdate(array $objectIDs, string $categoryConst, array $attr
495495
$requests[] = [
496496
'method' => 'cmdb.category.save',
497497
'params' => [
498-
'objID' => $objectID,
498+
'object' => $objectID,
499499
'category' => $categoryConst,
500500
'data' => $attributes
501501
]

0 commit comments

Comments
 (0)