diff options
author | dartcafe <github@dartcafe.de> | 2022-08-06 11:03:57 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2022-08-21 02:29:30 +0300 |
commit | ceff9809a8ccdf0a0c4cb5f231bbc66a6afd24e8 (patch) | |
tree | 176b2a9a5709e43c2263525dd85109b86f155542 /src/js/store/modules | |
parent | 96eead52d6a45654e74fd018c957021eadb36536 (diff) |
send out confirmed options
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/store/modules')
-rw-r--r-- | src/js/store/modules/poll.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/js/store/modules/poll.js b/src/js/store/modules/poll.js index e01a6769..d85827af 100644 --- a/src/js/store/modules/poll.js +++ b/src/js/store/modules/poll.js @@ -247,6 +247,17 @@ const actions = { } }, + async sendConfirmation(context, payload) { + const endPoint = `apps/polls/poll/${context.rootState.route.params.id}/confirmation` + try { + const response = await axios.post(generateUrl(endPoint)) + console.log(response.data) + return response.data.confirmations + } catch (e) { + console.error('Error sending confirmation', { error: e.response }, { payload }) + } + }, + async delete(context, payload) { const endPoint = `apps/polls/poll/${payload.pollId}` try { |