Skip to content

Commit 8406d02

Browse files
Merge pull request #404 from keboola/roman-fix-update-table-in-client
Add options class for table update, fix put in client
2 parents 0bd293f + 92aa268 commit 8406d02

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/Keboola/StorageApi/Client.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -697,17 +697,13 @@ public function createTableSnapshot($tableId, $snapshotDescription = null)
697697
*/
698698
public function updateTable($tableId, $options)
699699
{
700-
$url = "storage/tables/" . $tableId;
701-
702700
$allowedOptions = [
703701
'displayName',
704702
];
705703

706704
$filteredOptions = array_intersect_key($options, array_flip($allowedOptions));
707705

708-
$url .= '?' . http_build_query($filteredOptions);
709-
710-
$result = $this->apiPut($url);
706+
$result = $this->apiPut('storage/tables/' . $tableId, $filteredOptions);
711707
$this->log("Table {$tableId} updated");
712708
return $result['id'];
713709
}

0 commit comments

Comments
 (0)