From 6135ebf94559908b26d8b6ac9cea0bc49f5da7e6 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Tue, 24 Sep 2024 21:02:58 +0200 Subject: [PATCH] fix vote limit for public users Signed-off-by: dartcafe --- lib/Controller/PublicController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()), ]); }