curl --request GET \
--url https://api.yourdomain.com/api/chats/chat_123abc/votes \
--header 'Authorization: Bearer <token>'
{
"success": true,
"votes": [
{
"id": "vote_789xyz",
"chatId": "chat_123abc",
"messageId": "msg_456def",
"isUpvoted": true,
"createdAt": "2024-01-17T10:30:00Z"
},
{
"id": "vote_012abc",
"chatId": "chat_123abc",
"messageId": "msg_789ghi",
"isUpvoted": false,
"createdAt": "2024-01-17T10:35:00Z"
}
]
}
Retrieves all votes for a specific chat
curl --request GET \
--url https://api.yourdomain.com/api/chats/chat_123abc/votes \
--header 'Authorization: Bearer <token>'
{
"success": true,
"votes": [
{
"id": "vote_789xyz",
"chatId": "chat_123abc",
"messageId": "msg_456def",
"isUpvoted": true,
"createdAt": "2024-01-17T10:30:00Z"
},
{
"id": "vote_012abc",
"chatId": "chat_123abc",
"messageId": "msg_789ghi",
"isUpvoted": false,
"createdAt": "2024-01-17T10:35:00Z"
}
]
}
curl --request GET \
--url https://api.yourdomain.com/api/chats/chat_123abc/votes \
--header 'Authorization: Bearer <token>'
{
"success": true,
"votes": [
{
"id": "vote_789xyz",
"chatId": "chat_123abc",
"messageId": "msg_456def",
"isUpvoted": true,
"createdAt": "2024-01-17T10:30:00Z"
},
{
"id": "vote_012abc",
"chatId": "chat_123abc",
"messageId": "msg_789ghi",
"isUpvoted": false,
"createdAt": "2024-01-17T10:35:00Z"
}
]
}