-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"FEAT: Implement Product Review and Star Rating Feature" #1319
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this feature allows user to create, delete and update a review on any organizations products, also allowing full control of their reviews
"the skipAuth conflicts with the already defined type in the Base code base"
….com/Jhaemis-hack/hng_boilerplate_nestjs into feature/included-review-staring-func
…ng-func "fix: included review repository in product test mock file"
incredible-phoenix246
requested changes
Mar 1, 2025
"fix: removed package-lock and compose"
incredible-phoenix246
approved these changes
Mar 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
The
ProductsController
andProductsService
have been enhanced to support Product Reviews, Star Ratings, and Comments. Previously, the system lacked direct mechanisms for users to leave feedback on products, limiting transparency and engagement.Key Additions:
Authenticated users can submit or update product reviews with:
Authenticated users can delete their own product reviews.
Each product now exposes the following in its response:
Why this matters:
This enhancement improves user engagement, increases transparency, and provides organizations with actionable feedback to enhance their product offerings.
Related Issue
Fixes #
Type of Change
How Has This Been Tested?
ProductsService
andProductsController
Test Evidence
Screenshots
Get a product review before creating a review
Create a review and star rating
Get product review after a creating a review
Delete a product review
Checklist
Additional Notes
This implementation ensures the
ProductResponseDto
now includes the correctrecentReviews
,averageRating
, andtotalReviews
fields, keeping them consistent across all relevant product responses. The review feature is self-contained within theproducts
module for maintainability.Suggested Commit Message
feat(products): add product reviews, star ratings, and comments feature
## Suggested Branch Name
feature/product-reviews