aboutsummaryrefslogtreecommitdiff
path: root/src/modules/polls.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-11-24 13:57:46 +0200
committerHenry Jameson <me@hjkos.com>2019-11-24 13:57:46 +0200
commitddb6fb9217789e90490a4ec1ce7a2dd9ced67631 (patch)
treeffe3c49d40bfa773d237aec3610c26be901c4255 /src/modules/polls.js
parent41d2fa2fd66ca33b0c83f65d608ee37f8ffcb152 (diff)
Backend Interactor service overhaul, removed the need for copypasting
Diffstat (limited to 'src/modules/polls.js')
-rw-r--r--src/modules/polls.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/polls.js b/src/modules/polls.js
index e6158b63..92b89a06 100644
--- a/src/modules/polls.js
+++ b/src/modules/polls.js
@@ -40,7 +40,7 @@ const polls = {
commit('mergeOrAddPoll', poll)
},
updateTrackedPoll ({ rootState, dispatch, commit }, pollId) {
- rootState.api.backendInteractor.fetchPoll(pollId).then(poll => {
+ rootState.api.backendInteractor.fetchPoll({ pollId }).then(poll => {
setTimeout(() => {
if (rootState.polls.trackedPolls[pollId]) {
dispatch('updateTrackedPoll', pollId)
@@ -59,7 +59,7 @@ const polls = {
commit('untrackPoll', pollId)
},
votePoll ({ rootState, commit }, { id, pollId, choices }) {
- return rootState.api.backendInteractor.vote(pollId, choices).then(poll => {
+ return rootState.api.backendInteractor.vote({ pollId, choices }).then(poll => {
commit('mergeOrAddPoll', poll)
return poll
})