diff --git a/marketplace-ui/src/app/modules/product/product-detail/product-detail.component.ts b/marketplace-ui/src/app/modules/product/product-detail/product-detail.component.ts index efab63cf3..4100ffa51 100644 --- a/marketplace-ui/src/app/modules/product/product-detail/product-detail.component.ts +++ b/marketplace-ui/src/app/modules/product/product-detail/product-detail.component.ts @@ -136,7 +136,7 @@ export class ProductDetailComponent { if (!targetVersion) { return this.productService.getProductDetails(productId); } - return this.productService.getProductDetailsWithVersion( + return this.productService.getBestMatchProductDetailsWithVersion( productId, targetVersion ); diff --git a/marketplace-ui/src/app/modules/product/product.service.ts b/marketplace-ui/src/app/modules/product/product.service.ts index 8804bcf4b..723304134 100644 --- a/marketplace-ui/src/app/modules/product/product.service.ts +++ b/marketplace-ui/src/app/modules/product/product.service.ts @@ -43,6 +43,15 @@ export class ProductService { ); } + getBestMatchProductDetailsWithVersion( + productId: string, + tag: string + ): Observable { + return this.httpClient.get( + `api/product-details/${productId}/${tag}/bestmatch` + ); + } + getProductDetails(productId: string): Observable { return this.httpClient.get( `api/product-details/${productId}`