@infrab4a/connect-angular 4.3.12-beta.1 → 4.3.12-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1675,16 +1675,9 @@ class CatalogService {
1675
1675
  return this.findCatalogAndSortByMostRevelant(productsIds, options, limits);
1676
1676
  }
1677
1677
  if (this.hasCategory(options) && options.sort === 'most-relevant') {
1678
- const productsIds = await this.productRepository
1679
- .find({
1680
- filters: {
1681
- ...(await this.buildMainFilter(options)),
1682
- },
1683
- })
1684
- .then((products) => products.data.map((product) => product.id));
1685
- // const productsIds = options.category.products?.length
1686
- // ? options.category.products
1687
- // : await this.categoryRepository.get({ id: options.category.id }).then((categoryFound) => categoryFound.products)
1678
+ const productsIds = options.category.products?.length
1679
+ ? options.category.products
1680
+ : await this.categoryRepository.get({ id: options.category.id }).then((categoryFound) => categoryFound.products);
1688
1681
  return this.findCatalogAndSortByMostRevelant(productsIds, options, limits);
1689
1682
  }
1690
1683
  const repoParams = {