Skip to content

Commit

Permalink
fix vote limit for public users
Browse files Browse the repository at this point in the history
Signed-off-by: dartcafe <[email protected]>
  • Loading branch information
dartcafe committed Sep 24, 2024
1 parent a3cdfc8 commit 0bb8b4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Controller/PublicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,11 @@ public function restoreOption(int $optionId): JSONResponse {
#[PublicPage]
#[ShareTokenRequired]
public function setVote(int $optionId, string $setTo): JSONResponse {
$option = $this->optionService->get($optionId);
return $this->response(fn () => [
'vote' => $this->voteService->set($optionId, $setTo)
'vote' => $this->voteService->set($optionId, $setTo),
'poll' => $this->pollService->get($option->getPollId()),
'options' => $this->optionService->list($option->getPollId()),
]);
}

Expand Down

0 comments on commit 0bb8b4f

Please sign in to comment.