diff --git a/app/Containers/VikonIntegration/Actions/UpdatePartAction.php b/app/Containers/VikonIntegration/Actions/UpdatePartAction.php index 05e42ab..5b3a08b 100644 --- a/app/Containers/VikonIntegration/Actions/UpdatePartAction.php +++ b/app/Containers/VikonIntegration/Actions/UpdatePartAction.php @@ -33,7 +33,7 @@ class UpdatePartAction // Step 1: Request generation $genResponse = $this->http->postWithToken( - 'pull_updates/requestGeneratePartByNewCoreJson', + 'pull_updates/generatePartByNewCoreJson', $accessToken, ['part' => $part] ); @@ -56,10 +56,9 @@ class UpdatePartAction } // Step 3: Check result - $checkResponse = $this->http->postWithToken( - 'pull_updates/checkPartGenerationByNewCoreResultJson', - $accessToken, - ['operation_identity' => $operationIdentity, 'part' => $part] + $checkResponse = $this->http->getWithToken( + "pull_updates/checkPartGenerationByNewCoreResultJson?operation_identity={$operationIdentity}&part={$part}", + $accessToken ); $checkBody = $checkResponse->json(); diff --git a/app/Containers/VikonIntegration/Tests/Unit/UpdatePartActionTest.php b/app/Containers/VikonIntegration/Tests/Unit/UpdatePartActionTest.php index f36c340..3e1017b 100644 --- a/app/Containers/VikonIntegration/Tests/Unit/UpdatePartActionTest.php +++ b/app/Containers/VikonIntegration/Tests/Unit/UpdatePartActionTest.php @@ -74,7 +74,7 @@ class UpdatePartActionTest extends TestCase $http->shouldReceive('postWithToken') ->once() - ->with('pull_updates/requestGeneratePartByNewCoreJson', 'token', ['part' => 'common']) + ->with('pull_updates/generatePartByNewCoreJson', 'token', ['part' => 'common']) ->andReturn($this->mockResponse([ 'operation_identity' => 'op-abc-123', 'ttl' => 60, @@ -85,12 +85,9 @@ class UpdatePartActionTest extends TestCase ->with('op-abc-123', 'token') ->andReturn(['status' => 'completed']); - $http->shouldReceive('postWithToken') + $http->shouldReceive('getWithToken') ->once() - ->with('pull_updates/checkPartGenerationByNewCoreResultJson', 'token', [ - 'operation_identity' => 'op-abc-123', - 'part' => 'common', - ]) + ->with('pull_updates/checkPartGenerationByNewCoreResultJson?operation_identity=op-abc-123&part=common', 'token') ->andReturn($this->mockResponse(['success' => true])); // Create a minimal ZIP