We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9f28db commit 9e93bbaCopy full SHA for 9e93bba
src/api/index.js
@@ -93,6 +93,7 @@ export const postsApi = {
93
byNewbie: params => $http('/api/posts/patrol', { params })
94
}
95
export const pollsApi = {
96
+ create: (threadId, params) => $http(`/api/threads/${threadId}/polls`, { method: 'POST', data: params }),
97
vote: (threadId, pollId, answerIds) => $http(`/api/threads/${threadId}/polls/${pollId}/vote`, { method: 'POST', data: { answer_ids: answerIds }}),
98
removeVote: (threadId, pollId) => $http(`/api/threads/${threadId}/polls/${pollId}/vote`, { method: 'DELETE' }),
99
editPoll: (threadId, pollId, options) => $http(`/api/threads/${threadId}/polls/${pollId}`, { method: 'PUT', data: options }),
0 commit comments