From aa9826fe59d57026248c898191818def2b0fcde9 Mon Sep 17 00:00:00 2001 From: "kirti.garg" Date: Thu, 26 Sep 2024 19:23:50 +0530 Subject: [PATCH] LCH-7111 | ContentHubClient::deleteMultipleInterest() function fixed --- src/ContentHubClient.php | 4 ++-- test/ContentHubClientTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ContentHubClient.php b/src/ContentHubClient.php index cbe32743..0dea0fbc 100644 --- a/src/ContentHubClient.php +++ b/src/ContentHubClient.php @@ -787,8 +787,8 @@ public function deleteInterest(string $uuid, string $webhook_uuid): ResponseInte * Response. */ public function deleteMultipleInterest(string $webhook_uuid, array $interest_list, string $site_role): ResponseInterface { - $options['body'] = json_encode(['uuids' => [$interest_list]]); - return $this->delete("v2/interest/$webhook_uuid/$site_role", $options); + $options['body'] = json_encode(['uuids' => $interest_list]); + return $this->delete("interest/webhook/$webhook_uuid/$site_role", $options); } /** diff --git a/test/ContentHubClientTest.php b/test/ContentHubClientTest.php index 5a1f1689..5771203c 100644 --- a/test/ContentHubClientTest.php +++ b/test/ContentHubClientTest.php @@ -973,7 +973,7 @@ public function testDeleteMultipleInterest(): void { $this->ch_client ->shouldReceive('delete') ->once() - ->with("v2/interest/$webhook_uuid/$site_role", ['body' => json_encode(['uuids' => [$interest_list]])]) + ->with("interest/webhook/$webhook_uuid/$site_role", ['body' => json_encode(['uuids' => $interest_list])]) ->andReturn($this->makeMockResponse(SymfonyResponse::HTTP_OK, [], '')); $api_response = $this->ch_client->deleteMultipleInterest($webhook_uuid, $interest_list, 'subscriber'); @@ -985,7 +985,7 @@ public function testDeleteMultipleInterest(): void { $this->ch_client ->shouldReceive('delete') ->once() - ->with("v2/interest/$webhook_uuid/$site_role", ['body' => json_encode(['uuids' => [$interest_list]])]) + ->with("interest/webhook/$webhook_uuid/$site_role", ['body' => json_encode(['uuids' => $interest_list])]) ->andReturn($this->makeMockResponse(SymfonyResponse::HTTP_OK, [], '')); $api_response = $this->ch_client->deleteMultipleInterest($webhook_uuid, $interest_list, 'subscriber');