Skip to content

Commit

Permalink
filter active brands (#1157)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlgimenes authored Feb 22, 2022
1 parent a51e880 commit 5821683
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 5821683

Please sign in to comment.