Fix empty votes arbitrarily increasing voters count in polls

This commit is contained in:
Eugen Rochko 2022-05-12 16:36:11 +02:00
parent fb87d6adc2
commit 5e6801f6d7

View file

@ -5,6 +5,8 @@ class VoteService < BaseService
include Payloadable
def call(account, poll, choices)
return if choices.empty?
authorize_with account, poll, :vote?
@account = account