From bfc193d8cd9aecdb82d585e8b4e101deac60a5bb Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 29 Mar 2018 14:48:47 +0900 Subject: Resolve conflicts --- src/server/web/app/common/views/components/poll.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/server/web/app/common/views/components/poll.vue') diff --git a/src/server/web/app/common/views/components/poll.vue b/src/server/web/app/common/views/components/poll.vue index 8156c8bc58..711d89720e 100644 --- a/src/server/web/app/common/views/components/poll.vue +++ b/src/server/web/app/common/views/components/poll.vue @@ -4,7 +4,7 @@
  • - + {{ choice.text }} ({{ '%i18n:common.tags.mk-poll.vote-count%'.replace('{}', choice.votes) }}) @@ -36,7 +36,7 @@ export default Vue.extend({ return this.poll.choices.reduce((a, b) => a + b.votes, 0); }, isVoted(): boolean { - return this.poll.choices.some(c => c.is_voted); + return this.poll.choices.some(c => c.isVoted); } }, created() { @@ -47,15 +47,15 @@ export default Vue.extend({ this.showResult = !this.showResult; }, vote(id) { - if (this.poll.choices.some(c => c.is_voted)) return; + if (this.poll.choices.some(c => c.isVoted)) return; (this as any).api('posts/polls/vote', { - post_id: this.post.id, + postId: this.post.id, choice: id }).then(() => { this.poll.choices.forEach(c => { if (c.id == id) { c.votes++; - Vue.set(c, 'is_voted', true); + Vue.set(c, 'isVoted', true); } }); this.showResult = true; -- cgit v1.2.3-freya