Skip to content

Commit

Permalink
feat: include more fields when converting product to projection
Browse files Browse the repository at this point in the history
  • Loading branch information
tleguijt authored and mvantellingen committed Aug 23, 2022
1 parent 1ceae57 commit d2ee087
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
0.8.1 (unreleased)
==================
- Include `key`, `description` and `metaDescription` when converting product to product projection

0.8.0 (27-07-2022)
==================
- Implement experimental support for facets in the product projection search.
- Implement experimental support for facets in the product projection search.

0.7.2 (26-07-2022)
==================
Expand Down
4 changes: 4 additions & 0 deletions src/product-projection-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export class ProductProjectionSearch {
const filters = params['filter.query'].map(f =>
parseFilterExpression(f, params.staged ?? false)
)

resources = resources.filter(resource =>
filters.every(f => f(resource, markMatchingVariant))
)
Expand Down Expand Up @@ -154,6 +155,9 @@ export class ProductProjectionSearch {
lastModifiedAt: product.lastModifiedAt,
version: product.version,
name: obj.name,
key: product.key,
description: obj.description,
metaDescription: obj.metaDescription,
slug: obj.slug,
categories: obj.categories,
masterVariant: obj.masterVariant,
Expand Down

0 comments on commit d2ee087

Please sign in to comment.