Skip to content

Commit

Permalink
Merge pull request #3720 from nextcloud/fix/vote-limits-public-user
Browse files Browse the repository at this point in the history
fix vote limit for public users
  • Loading branch information
dartcafe authored Sep 24, 2024
2 parents 0198ce0 + 0bb8b4f commit afd02c5
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 afd02c5

Please sign in to comment.