diff options
author | dartcafe <github@dartcafe.de> | 2020-09-01 01:09:19 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2020-09-01 01:09:19 +0300 |
commit | 8106e1b488c2243746ec5d39700bbbab1f7a250a (patch) | |
tree | 56d97520e742dba5f94afe25a17c8d2c59c66fc8 /lib/Controller | |
parent | 46678428e6dcfd422712f9a89415523f478ae10d (diff) |
some fixes
Diffstat (limited to 'lib/Controller')
-rw-r--r-- | lib/Controller/PollApiController.php | 2 | ||||
-rw-r--r-- | lib/Controller/ShareApiController.php | 2 | ||||
-rw-r--r-- | lib/Controller/SubscriptionApiController.php | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/Controller/PollApiController.php b/lib/Controller/PollApiController.php index c2e4750f..c9cdc174 100644 --- a/lib/Controller/PollApiController.php +++ b/lib/Controller/PollApiController.php @@ -90,7 +90,7 @@ */ public function get($pollId) { try { - return new DataResponse(['poll' => $this->pollService->get($pollId)], Http::STATUS_OK); + return new DataResponse(['poll' => $this->pollService->get($pollId, '')], Http::STATUS_OK); } catch (DoesNotExistException $e) { return new DataResponse(['error' => 'Not found'], Http::STATUS_NOT_FOUND); } catch (NotAuthorizedException $e) { diff --git a/lib/Controller/ShareApiController.php b/lib/Controller/ShareApiController.php index 57c65033..5ffe1a63 100644 --- a/lib/Controller/ShareApiController.php +++ b/lib/Controller/ShareApiController.php @@ -76,7 +76,7 @@ class ShareApiController extends ApiController { */ public function list($pollId) { try { - return new DataResponse(['shares' => $this->shareService->list($pollId)], Http::STATUS_OK); + return new DataResponse(['shares' => $this->shareService->list($pollId, '')], Http::STATUS_OK); } catch (DoesNotExistException $e) { return new DataResponse(['error' => 'No shares for poll with id ' . $pollId . ' not found'], Http::STATUS_NOT_FOUND); } catch (NotAuthorizedException $e) { diff --git a/lib/Controller/SubscriptionApiController.php b/lib/Controller/SubscriptionApiController.php index b8a87d16..84936691 100644 --- a/lib/Controller/SubscriptionApiController.php +++ b/lib/Controller/SubscriptionApiController.php @@ -73,7 +73,7 @@ class SubscriptionApiController extends ApiController { */ public function get($pollId) { try { - $this->subscriptionService->get($pollId); + $this->subscriptionService->get($pollId, ''); return new DataResponse(['status' => 'Subscribed to poll ' . $pollId], Http::STATUS_OK); } catch (DoesNotExistException $e) { return new DataResponse(['status' => 'Not subscribed to poll ' . $pollId], Http::STATUS_NOT_FOUND); @@ -92,7 +92,7 @@ class SubscriptionApiController extends ApiController { */ public function subscribe($pollId) { try { - $this->subscriptionService->set($pollId, true); + $this->subscriptionService->set($pollId, '', true); return new DataResponse(['status' => 'Subscribed to poll ' . $pollId], Http::STATUS_OK); } catch (NotAuthorizedException $e) { return new DataResponse(['error' => $e->getMessage()], $e->getStatus()); @@ -108,7 +108,7 @@ class SubscriptionApiController extends ApiController { */ public function unsubscribe($pollId) { try { - $this->subscriptionService->set($pollId, false); + $this->subscriptionService->set($pollId, '', false); return new DataResponse(['status' => 'Unsubscribed from poll ' . $pollId], Http::STATUS_OK); } catch (NotAuthorizedException $e) { return new DataResponse(['error' => $e->getMessage()], $e->getStatus()); |