Skip to content

Commit

Permalink
Format updateItem fields like createItem fields
Browse files Browse the repository at this point in the history
This makes updateItem work similarly to createItem, and avoids the need to further nest $fields at the call-site.
  • Loading branch information
assertchris committed May 7, 2019
1 parent d9a74f4 commit c64759f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Webflow/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ public function createItem(string $collectionId, array $fields)

public function updateItem(string $collectionId, string $itemId, array $fields)
{
return $this->put("/collections/{$collectionId}/items/{$itemId}", $fields);
return $this->put("/collections/{$collectionId}/items/{$itemId}", [
'fields' => $fields,
]);
}

public function removeItem(string $collectionId, $itemId)
Expand Down

0 comments on commit c64759f

Please sign in to comment.