Skip to content

Commit a85d288

Browse files
authored
fix: ensure channel data set is wrapped in (#3)
1 parent ef78d97 commit a85d288

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Api/Objects.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public function setChannelData(
173173
array $body,
174174
array $headers = []
175175
): array {
176+
$body = ['data' => $body];
176177
$url = $this->url('/objects/%s/%s/channel_data/%s', $collection, $objectId, $channelId);
177178

178179
return $this->putRequest($url, $body, $headers);

src/Api/Users.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ public function getChannelData(string $userId, string $channelId, array $headers
187187
*/
188188
public function setChannelData(string $userId, string $channelId, array $body, array $headers = []): array
189189
{
190+
$body = ['data' => $body];
190191
$url = $this->url('/users/%s/channel_data/%s', $userId, $channelId);
191192

192193
return $this->putRequest($url, $body, $headers);

0 commit comments

Comments
 (0)