diff --git a/lib/Controller/PublicController.php b/lib/Controller/PublicController.php index 62e219c83..7a441b35e 100644 --- a/lib/Controller/PublicController.php +++ b/lib/Controller/PublicController.php @@ -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()), ]); }