Skip to content
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

GET product reviews request with an invalid value of param "product_rating" the system returns all product reviews #329

Open
TetianaPerinha opened this issue Jun 20, 2024 · 4 comments · May be fixed by #330
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@TetianaPerinha
Copy link
Collaborator

Describe the bug
When sending a GET product reviews request with an invalid value of param "product_rating" the system returns all product reviews

To Reproduce
Send the GET request as below use value for param product_rating = %

curl --location '[https://iced-latte.uk/backend/api/v1/products/e6a4d7f2-d40e-4e5f-93b8-5d56ce6724c5/reviews?page={value}]([https://iced-latte.uk/backend/api/v1/products/e6a4d7f2-d40e-4e5f-93b8-5d56ce6724c5/reviews?size={value}](https://iced-latte.uk/backend/api/v1/products/e6a4d7f2-d40e-4e5f-93b8-5d56ce6724c5/reviews?product_rating={value}

Expected behavior
The system should reject the request with 400 HTTP Status code "error": "Bad Request".

Actual result
System accept the request and returns all product reviews.

get all reviews with param product_ratings = %
@TetianaPerinha TetianaPerinha added bug Something isn't working good first issue Good for newcomers labels Jun 20, 2024
@Prankurtiwari
Copy link

Hi TetianaPerinha, Can you assign this issue to me ??? Or is it okay if i start working on this ??
Please let me know in any case.
TBH I am contributing to Open Source for the first time so I am unaware of the protocols.

@Prankurtiwari
Copy link

Hi TetianaPerinha, I have raised the initial PR. Please review

@TetianaPerinha
Copy link
Collaborator Author

Hi TetianaPerinha, I have raised the initial PR. Please review

@Sunagatov Please review the pr

@Prankurtiwari
Copy link

Hi @TetianaPerinha & @Sunagatov Please review my PR , it's been pending from last week.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
2 participants