Skip to content

Commit

Permalink
bugfix: update filter product by price
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhhTien committed Mar 11, 2024
1 parent 01285f3 commit fd10bba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/product/controllers/customer.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class PublicProductController {
$search: filterProductDto.name
}
}
if (filterProductDto.fromPrice && filterProductDto.toPrice) {
if (filterProductDto.fromPrice !== undefined && filterProductDto.toPrice !== undefined) {
condition['variants'] = {
$elemMatch: { price: { $gte: filterProductDto.fromPrice, $lte: filterProductDto.toPrice } }
}
Expand Down

0 comments on commit fd10bba

Please sign in to comment.