fix(vikon): correct VIKON API endpoint names for part updates

This commit is contained in:
F4ilji
2026-07-05 10:21:27 +05:00
parent d83364432e
commit e83cd0109d
2 changed files with 7 additions and 11 deletions
@@ -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();
@@ -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