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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Controller/SubscriptionApiController.php')
-rw-r--r--lib/Controller/SubscriptionApiController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Controller/SubscriptionApiController.php b/lib/Controller/SubscriptionApiController.php
index 7a63e88e..419d2228 100644
--- a/lib/Controller/SubscriptionApiController.php
+++ b/lib/Controller/SubscriptionApiController.php
@@ -78,7 +78,7 @@ class SubscriptionApiController extends ApiController {
*/
public function subscribe(int $pollId): DataResponse {
try {
- $this->subscriptionService->set($pollId, '', true);
+ $this->subscriptionService->set(true, $pollId, '');
return new DataResponse(['status' => 'Subscribed to poll ' . $pollId], Http::STATUS_OK);
} catch (Exception $e) {
return new DataResponse(['message' => $e->getMessage()], $e->getStatus());
@@ -93,7 +93,7 @@ class SubscriptionApiController extends ApiController {
*/
public function unsubscribe(int $pollId): DataResponse {
try {
- $this->subscriptionService->set($pollId, '', false);
+ $this->subscriptionService->set(false, $pollId, '');
return new DataResponse(['status' => 'Unsubscribed from poll ' . $pollId], Http::STATUS_OK);
} catch (Exception $e) {
return new DataResponse(['message' => $e->getMessage()], $e->getStatus());