Skip to content

Commit

Permalink
Merge pull request #3726 from nextcloud/backport/3720/next
Browse files Browse the repository at this point in the history
[next] fix vote limit for public users
  • Loading branch information
dartcafe authored Sep 26, 2024
2 parents 21d3de4 + 6135ebf commit f619306
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 @@ -238,8 +238,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 f619306

Please sign in to comment.