saurabhbakolia / SCROLLME--ECOMMERCE-WEBSITE

ScrollMe is an open-source eCommerce platform built with JavaScript, React, Styled Components, Node.js (Express), and MongoDB. It offers a modern shopping experience with a scalable backend, perfect for contributors or those learning modern web development.
https://www.scrollme.online/
MIT License
19 stars 61 forks source link

Creating APIs for Review Comments and Star rating for logged in user #264

Open samriddhitiwary opened 3 days ago

samriddhitiwary commented 3 days ago

Issue Report

Title

Creating APIs for Review Comments and Star rating for logged in user

Description

The goal is to develop backend APIs for managing review comments and star ratings for products or services by logged-in users. This should allow users to submit, view, and manage their reviews and ratings. The system should also restrict unauthenticated users from accessing these features, ensuring only logged-in users can post or update reviews. The following features are expected:

Add Review API: Enables users to post a review with a comment and star rating. Fetch Reviews API: Retrieves all reviews for a particular item, including user details. Edit/Delete Review API: Allows users to modify or delete their own reviews.

Steps to Reproduce the Issue

To assist us in understanding and resolving the issue, please outline the steps you took that led to the problem: To assist in replicating the requirements and verifying them:

Action 1: Attempt to add a review without logging in. Action 2: Log in, then submit a review with a comment and star rating. Action 3: View the list of reviews for a particular product, including user details. Action 4: Try editing or deleting the review as the logged-in user. Action 5: Attempt to edit or delete reviews as an unauthenticated user or as a different logged-in user. Feel free to be as detailed as necessary so we can replicate the issue accurately.

Expected Behavior

Unauthenticated users should receive an error when attempting to add, edit, or delete reviews. Logged-in users should be able to add reviews with a comment and a star rating. All reviews for a specific item should be displayed, including user information. Only the review owner should be able to edit or delete their review.

Actual Behavior

Describe any deviations from the expected behavior, such as: Unauthenticated users accessing restricted actions. Errors in retrieving or displaying review data. Inability to edit or delete reviews as the review owner.

Screenshots (if applicable)

image

samriddhitiwary commented 3 days ago

@thakuratul2 @saurabhbakolia Could you please assign this issue to me