summaryrefslogtreecommitdiff
path: root/app/Api/Comment.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-16 21:07:29 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-16 21:07:29 -0400
commitb1e2ca00ce7375ffcbe5e927135c8892036e6bd6 (patch)
tree07ce453261f6493de7c901cfd8b4f0d9af85556d /app/Api/Comment.php
parent4514bc1d4b4abff23902e46da76e70f13a3647eb (diff)
Rename Api classes
Diffstat (limited to 'app/Api/Comment.php')
-rw-r--r--app/Api/Comment.php52
1 files changed, 0 insertions, 52 deletions
diff --git a/app/Api/Comment.php b/app/Api/Comment.php
deleted file mode 100644
index 1fc1c708..00000000
--- a/app/Api/Comment.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-namespace Kanboard\Api;
-
-/**
- * Comment API controller
- *
- * @package api
- * @author Frederic Guillot
- */
-class Comment extends \Kanboard\Core\Base
-{
- public function getComment($comment_id)
- {
- return $this->comment->getById($comment_id);
- }
-
- public function getAllComments($task_id)
- {
- return $this->comment->getAll($task_id);
- }
-
- public function removeComment($comment_id)
- {
- return $this->comment->remove($comment_id);
- }
-
- public function createComment($task_id, $user_id, $content, $reference = '')
- {
- $values = array(
- 'task_id' => $task_id,
- 'user_id' => $user_id,
- 'comment' => $content,
- 'reference' => $reference,
- );
-
- list($valid, ) = $this->commentValidator->validateCreation($values);
-
- return $valid ? $this->comment->create($values) : false;
- }
-
- public function updateComment($id, $content)
- {
- $values = array(
- 'id' => $id,
- 'comment' => $content,
- );
-
- list($valid, ) = $this->commentValidator->validateModification($values);
- return $valid && $this->comment->update($values);
- }
-}