Skip to content

Commit

Permalink
chore: update API create review, match condition
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhhTien committed Jun 30, 2024
1 parent a367c2d commit bad8bb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/review/services/review.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ export class ReviewService {

// 3. Update rating product
const rateSummary = await this.reviewRepository.model.aggregate([
{
$match: {
product: product._id.toString()
}
},
{
$group: {
_id: '$product',
Expand Down

0 comments on commit bad8bb5

Please sign in to comment.