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:
authordartcafe <github@dartcafe.de>2020-06-14 23:42:17 +0300
committerdartcafe <github@dartcafe.de>2020-06-14 23:42:17 +0300
commit76cba400fc9d8139d1b62fb6e1ce3746368a5574 (patch)
tree9f286bd6343c900cb929bcb444d5cf761675dc37 /lib/Service/CommentService.php
parentc6d2e376387755e10d6c4bf4107a14e65a3a5886 (diff)
Added options to API & changed routes & updated comments
Diffstat (limited to 'lib/Service/CommentService.php')
-rw-r--r--lib/Service/CommentService.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Service/CommentService.php b/lib/Service/CommentService.php
index 5cc29045..d939ec18 100644
--- a/lib/Service/CommentService.php
+++ b/lib/Service/CommentService.php
@@ -24,7 +24,6 @@
namespace OCA\Polls\Service;
use \Exception;
-use OCP\AppFramework\Db\DoesNotExistException;
use OCP\IGroupManager;
use OCP\ILogger;
@@ -89,13 +88,10 @@ class CommentService {
* @param string $token
* @return Array
*/
- public function get($pollId = 0, $token = '') {
+ public function list($pollId = 0, $token = '') {
$this->logger->debug('call commentService->get(' . $pollId . ', '. $token . ')');
if (!$this->acl->checkAuthorize($pollId, $token)) {
- $this->logger->debug('Acl UserId ' . $this->acl->getUserId());
- $this->logger->debug('Acl PollId ' . $this->acl->getPollId());
- $this->logger->debug('Unauthorized access');
throw new NotAuthorizedException;
}
@@ -152,8 +148,8 @@ class CommentService {
* @return Comment
*/
public function delete($commentId, $token = '') {
- $this->logger->debug('call commentService->delete(' . $commentId . ', "' .$token . '")');
+ $this->logger->debug('call commentService->delete(' . $commentId . ', "' .$token . '")');
$this->comment = $this->commentMapper->find($commentId);
if (!$this->acl->checkAuthorize($this->comment->getPollId(), $token) || $this->comment->getUserId() !== $this->acl->getUserId()) {
throw new NotAuthorizedException;