Skip to content

Commit

Permalink
fix: remove streams
Browse files Browse the repository at this point in the history
  • Loading branch information
didoda committed Sep 16, 2024
1 parent fc4bd75 commit 02f0758
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Controller/TrashController.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ public function delete(): ?Response
$ids = [$this->getRequest()->getData('id')];
}
try {
$response = $this->apiClient->get('/streams', ['filter' => ['object_id' => $ids]]);
$this->apiClient->removeObjects($ids);
$streams = (array)Hash::get($response, 'data');
$this->removeStreams($streams);
$this->Flash->success(__('Object(s) deleted from trash'));
} catch (BEditaClientException $e) {
// Error! Back to object view.
Expand Down

0 comments on commit 02f0758

Please sign in to comment.