Skip to content

Commit

Permalink
Update Builder.php
Browse files Browse the repository at this point in the history
Correct issue on deletion
  • Loading branch information
colinhall17 committed May 29, 2020
1 parent 1a7c536 commit 8c485d6
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions src/Support/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -758,30 +758,12 @@ protected function processMultiPutResponse($response)

protected function processIndividualDeleteResponse($response)
{
if($this->getApiDataField() != null){
$data = $response->json()[$this->getApiDataField()];
} else {
$data = $response->json();
}
if(isset($data[0])){
return $this->resource->updateFromBuilder($this->resource->passOnAttributes($data[0]));
} else {
return $this->resource->updateFromBuilder($this->resource->passOnAttributes($data));
}
return true;
}

protected function processMultiDeleteResponse($response)
{
// if($this->getApiDataField() != null){
// $data = $response->json()[$this->getApiDataField()];
// } else {
// $data = $response->json();
// }
// if(isset($data[0])){
// return $this->resource->newFromBuilder($this->resource->passOnAttributes($data[0]));
// } else {
// return $this->resource->newFromBuilder($this->resource->passOnAttributes($data));
// }
return true;
}

public function prepareHttpErrorMessage($response)
Expand Down

0 comments on commit 8c485d6

Please sign in to comment.