add : product stats
This commit is contained in:
@@ -979,8 +979,9 @@ class ProductService {
|
||||
throw new BadRequestError(CommonMessage.NotEnoughVariant);
|
||||
}
|
||||
const product = ProductDTO.transformProduct(docs[0]);
|
||||
const stats = await this.commentRepo.getProductStats(productId);
|
||||
const categoryPath = await this.categoryRepo.getCategoryPath(product.category._id.toString());
|
||||
return { product, categoryPath };
|
||||
return { product, categoryPath, stats };
|
||||
}
|
||||
//**************************************************************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user