Handle review from users.
Copy .env.example
to .env
and change the value to your environment.
Add your JWT_SECRET
to .env
file, which should come from user-service.
JWT_SECRET=
Run the following command to start everything inside docker container.
docker-compose up -d
Or run with the following command to start the application locally.
mvn spring-boot:run
Service run at http://localhost:8091
Every route require Authorization header with JWT token. (Except GET /api/reviews/**)
{
"title": "Good",
"content": "test",
"rating": 3
}
{
"title": "Good",
"content": "test",
"rating": 4,
"images": [
{
"imageUrl": "https://www.wongnai.com/blog/content/uploads/2019/10/cover-1.jpg"
},
{
"imageUrl": "https://www.wongnai.com/blog/content/uploads/2019/10/cover-1.jpg"
}
]
}
DELETE -> http://localhost:8091/api/reviews/{id}
If user already like the review, it will unlike the review.
{
"content": "test"
}
{
"content": "test"
}