Skip to content

Commit

Permalink
Change DELETE param spec
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesvdvreken committed Apr 13, 2018
1 parent 37528d0 commit 1ade2af
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/GetStream/Stream/Collections.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ public function upsert($collectionName, array $data)
{
$options = ['json' => ['data' => [$collectionName => $data]]];

var_dump($options); exit;

try {
$response = $this->client->request('POST', 'meta/', $options);
} catch (ClientException $e) {
Expand All @@ -98,10 +96,11 @@ public function upsert($collectionName, array $data)
*/
public function delete($collectionName, array $ids)
{
$options = ['json' => ['collection_name' => $collectionName, 'ids' => $ids]];
$ids = join(',', $ids);
$queryParams = ['collection_name' => $collectionName, 'ids' => $ids];

try {
$response = $this->client->request('DELETE', 'meta/', $options);
$response = $this->client->request('DELETE', 'meta/?'.http_build_query($queryParams));
} catch (ClientException $e) {
throw new StreamFeedException($e->getResponse()->getBody());
}
Expand Down

0 comments on commit 1ade2af

Please sign in to comment.