Skip to content

Commit

Permalink
Use different endpoint for different RefinedEnvironmentType when gett…
Browse files Browse the repository at this point in the history
…ing a list of deployable packages
  • Loading branch information
Janusz Chalimoniuk committed Mar 1, 2024
1 parent 084132f commit 3b656b3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion 2LCS/HttpClientHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,22 @@ internal List<DeployablePackage> GetPagedDeployablePackageList(CloudHostedInstan

internal string GetPagedDeployablePackageListUrl(CloudHostedInstance instance)
{
return $"{LcsUrl}/Environment/GetPagedDeployablePackageList/{LcsProjectId}?lcsEnvironmentActionId=2&lcsEnvironmentId={instance.EnvironmentId}";
return $"{LcsUrl}/{GetDeployablePackageListEndpoint(instance)}/GetPagedDeployablePackageList/{LcsProjectId}?lcsEnvironmentActionId=2&lcsEnvironmentId={instance.EnvironmentId}";
}

internal string GetDeployablePackageListEndpoint(CloudHostedInstance instance)
{
switch (instance.RefinedEnvironmentType)
{
case RefinedEnvironmentType.DevTestDev:
{
return "Environment";
}
default:
{
return "EnvironmentServicingV2";
}
}
}

internal List<RDPConnectionDetails> GetRdpConnectionDetails(CloudHostedInstance instance)
Expand Down

0 comments on commit 3b656b3

Please sign in to comment.