curl -X POST https://api.marsai.com/votes/5/10 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"note": 8.5,
"comments": "Outstanding film with great performances"
}'
{
"message": "Vote créé",
"newVote": {
"id_vote": 1,
"id_user": 10,
"id_movie": 5,
"note": 8.5,
"comments": "Outstanding film with great performances"
}
}
curl -X POST https://api.marsai.com/votes/5/10 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"note": 8.5,
"comments": "Outstanding film with great performances"
}'
{
"message": "Vote créé",
"newVote": {
"id_vote": 1,
"id_user": 10,
"id_movie": 5,
"note": 8.5,
"comments": "Outstanding film with great performances"
}
}
curl -X POST https://api.marsai.com/votes/5/10 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"note": 8.5,
"comments": "Outstanding film with great performances"
}'
{
"message": "Vote créé",
"newVote": {
"id_vote": 1,
"id_user": 10,
"id_movie": 5,
"note": 8.5,
"comments": "Outstanding film with great performances"
}
}
{
"message": "Vote déjà existant",
"existingVote": { ... }
}
{
"error": "Note invalide"
}