diff --git a/src/Webflow/Api.php b/src/Webflow/Api.php index 2585413..b9d8e78 100644 --- a/src/Webflow/Api.php +++ b/src/Webflow/Api.php @@ -167,14 +167,14 @@ public function createItem(string $collectionId, array $fields, bool $live = fal "_draft" => false, ]; - return $this->post("/collections/{$collectionId}/items" . ($live ? "?live=true": ""), [ + return $this->post("/collections/{$collectionId}/items" . ($live ? "?live=true" : ""), [ 'fields' => array_merge($defaults, $fields), ]); } public function updateItem(string $collectionId, string $itemId, array $fields, bool $live = false) { - return $this->put("/collections/{$collectionId}/items/{$itemId}" . ($live ? "?live=true": ""), [ + return $this->put("/collections/{$collectionId}/items/{$itemId}" . ($live ? "?live=true" : ""), [ 'fields' => $fields, ]); }