Sunagatov / Iced-Latte

a online Marketplace for coffee retail (Backend)
https://iced-latte.uk
MIT License
587 stars 95 forks source link

System allows to save review with non-Latin text #313

Open TetianaPerinha opened 3 weeks ago

TetianaPerinha commented 3 weeks ago

Describe the bug The system allows it to save when sending a POST review request with non-Latin text.

Precondition: User is registered, the Bearer token is obtained, and the user has not posted a review on a product.

To Reproduce Send the POST request as below, and use a valid Bearer token.

curl --location 'https://iced-latte.uk/backend/api/v1/products/3ea8e601-24c9-49b1-8c65-8db8b3a5c7a3/reviews' \ --header 'Content-Type: application/json' \ --header 'Authorization: {token}' \ --data '{ "text":"Купил эспрессо онлайн, и был в восторге от качества. Аромат свежесмолотых зерен наполнил кухню, а вкус готового напитка был богатым и сбалансированным, с нотками шоколада и фруктов. Отличный сервис и быстрая доставка — обязательно закажу снова", "rating": "5"

}' Expected behavior The system should reject a request with 400 HTTP Status code and return the appropriate error message.

Actual result The system accept the request, HTTP Status code = 200, and review posted non-Latin text.

text review non latin