diff options
author | René Gieling <github@dartcafe.de> | 2020-12-05 15:19:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-05 15:19:29 +0300 |
commit | 6cb597c9e8de850a8492d4c76c4781456e11e9a8 (patch) | |
tree | a4ea6c3abb3e568ee28037de3d15bfde9629a734 /lib/Controller/CommentController.php | |
parent | 18ab3229485c0281405c560bad04e3c9f7ce511b (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.php | 16 |
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)]; }); } } |