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')
-rw-r--r--lib/Controller/PublicController.php4
-rw-r--r--lib/Controller/SubscriptionApiController.php4
-rw-r--r--lib/Controller/SubscriptionController.php4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/Controller/PublicController.php b/lib/Controller/PublicController.php
index 5843d7a2..040f4eb1 100644
--- a/lib/Controller/PublicController.php
+++ b/lib/Controller/PublicController.php
@@ -293,7 +293,7 @@ class PublicController extends Controller {
*/
public function subscribe(string $token): DataResponse {
return $this->response(function () use ($token) {
- return ['subscribed' => $this->subscriptionService->set(0, $token, true)];
+ return ['subscribed' => $this->subscriptionService->set(true, 0, $token)];
});
}
@@ -304,7 +304,7 @@ class PublicController extends Controller {
*/
public function unsubscribe(string $token): DataResponse {
return $this->response(function () use ($token) {
- return ['subscribed' => $this->subscriptionService->set(0, $token, false)];
+ return ['subscribed' => $this->subscriptionService->set(true, 0, $token)];
});
}
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());
diff --git a/lib/Controller/SubscriptionController.php b/lib/Controller/SubscriptionController.php
index deb640e1..b6289c46 100644
--- a/lib/Controller/SubscriptionController.php
+++ b/lib/Controller/SubscriptionController.php
@@ -61,7 +61,7 @@ class SubscriptionController extends Controller {
*/
public function subscribe(int $pollId): DataResponse {
return $this->response(function () use ($pollId) {
- return ['subscribed' => $this->subscriptionService->set($pollId, '', true)];
+ return ['subscribed' => $this->subscriptionService->set(true, $pollId, '')];
});
}
@@ -71,7 +71,7 @@ class SubscriptionController extends Controller {
*/
public function unsubscribe(int $pollId): DataResponse {
return $this->response(function () use ($pollId) {
- return ['subscribed' => $this->subscriptionService->set($pollId, '', false)];
+ return ['subscribed' => $this->subscriptionService->set(false, $pollId, '')];
});
}
}