Skip to content

Commit 9e93bba

Browse files
committed
feat(polls-api): implement create
1 parent d9f28db commit 9e93bba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/api/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export const postsApi = {
9393
byNewbie: params => $http('/api/posts/patrol', { params })
9494
}
9595
export const pollsApi = {
96+
create: (threadId, params) => $http(`/api/threads/${threadId}/polls`, { method: 'POST', data: params }),
9697
vote: (threadId, pollId, answerIds) => $http(`/api/threads/${threadId}/polls/${pollId}/vote`, { method: 'POST', data: { answer_ids: answerIds }}),
9798
removeVote: (threadId, pollId) => $http(`/api/threads/${threadId}/polls/${pollId}/vote`, { method: 'DELETE' }),
9899
editPoll: (threadId, pollId, options) => $http(`/api/threads/${threadId}/polls/${pollId}`, { method: 'PUT', data: options }),

0 commit comments

Comments
 (0)