Skip to content

Commit

Permalink
filter active brands
Browse files Browse the repository at this point in the history
  • Loading branch information
tlgimenes committed Feb 22, 2022
1 parent 0150222 commit 7a38121
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/api/src/platforms/vtex/resolvers/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ export const Query = {
}

const collections = [
...brands.map((x) => ({ ...x, type: 'brand' })),
...brands
.filter((brand) => brand.isActive)
.map((x) => ({ ...x, type: 'brand' })),
...categories,
]

Expand Down

0 comments on commit 7a38121

Please sign in to comment.