Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-09-01 10:46:36 +0300
committerdartcafe <github@dartcafe.de>2020-09-01 10:46:36 +0300
commit7ea450125ac9c156d800e3135e4e7e64f009dacb (patch)
tree9340f0b25b522dedc04f585e124b3afa2001494c /lib
parent31b1d73dcb5690730847da08693a397aac23ef2b (diff)
fix
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/VoteController.php2
-rw-r--r--lib/Service/VoteService.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Controller/VoteController.php b/lib/Controller/VoteController.php
index 32fc89a2..e8a75eec 100644
--- a/lib/Controller/VoteController.php
+++ b/lib/Controller/VoteController.php
@@ -98,7 +98,7 @@ class VoteController extends Controller {
*/
public function delete($pollId, $userId) {
try {
- return new DataResponse($this->voteService->delete($pollId, $userId), Http::STATUS_OK);
+ return new DataResponse(['deleted' => $this->voteService->delete($pollId, $userId)], Http::STATUS_OK);
} catch (NotAuthorizedException $e) {
return new DataResponse(['error' => $e->getMessage()], $e->getStatus());
} catch (DoesNotExistException $e) {
diff --git a/lib/Service/VoteService.php b/lib/Service/VoteService.php
index 26f70502..5fb0b5c7 100644
--- a/lib/Service/VoteService.php
+++ b/lib/Service/VoteService.php
@@ -161,7 +161,7 @@ class VoteService {
}
$this->voteMapper->deleteByPollAndUser($pollId, $userId);
- return true;
+ return $userId;
}
}