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:
authorRené Gieling <github@dartcafe.de>2020-12-05 15:19:29 +0300
committerGitHub <noreply@github.com>2020-12-05 15:19:29 +0300
commit6cb597c9e8de850a8492d4c76c4781456e11e9a8 (patch)
treea4ea6c3abb3e568ee28037de3d15bfde9629a734 /lib/Controller/CommentController.php
parent18ab3229485c0281405c560bad04e3c9f7ce511b (diff)
publicController (#1272)
* move public pages to one publicController * some more minor refactoring and optimizations
Diffstat (limited to 'lib/Controller/CommentController.php')
-rw-r--r--lib/Controller/CommentController.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/Controller/CommentController.php b/lib/Controller/CommentController.php
index bd9e3eb9..d844f90d 100644
--- a/lib/Controller/CommentController.php
+++ b/lib/Controller/CommentController.php
@@ -54,29 +54,25 @@ class CommentController extends Controller {
/**
* Write a new comment to the db and returns the new comment as array
* @NoAdminRequired
- * @PublicPage
* @param int $pollId
* @param string $message
- * @param string $token
* @return DataResponse
*/
- public function add($pollId, $message, $token) {
- return $this->response(function () use ($pollId, $message, $token) {
- return ['comment'=> $this->commentService->add($pollId, $message, $token)];
+ public function add($pollId, $message) {
+ return $this->response(function () use ($pollId, $message) {
+ return ['comment' => $this->commentService->add($pollId, null, $message)];
});
}
/**
* Delete Comment
* @NoAdminRequired
- * @PublicPage
* @param int $commentId
- * @param string $token
* @return DataResponse
*/
- public function delete($commentId, $token) {
- return $this->responseDeleteTolerant(function () use ($commentId, $token) {
- return ['comment'=> $this->commentService->delete($commentId, $token)];
+ public function delete($commentId) {
+ return $this->responseDeleteTolerant(function () use ($commentId) {
+ return ['comment' => $this->commentService->delete($commentId)];
});
}
}