From 4a230d331ec220fc32a48525afb308af0d9787fa Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 26 Jun 2016 10:25:13 -0400 Subject: Added application and project roles validation for API procedure calls --- app/Api/CommentApi.php | 54 -------------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 app/Api/CommentApi.php (limited to 'app/Api/CommentApi.php') diff --git a/app/Api/CommentApi.php b/app/Api/CommentApi.php deleted file mode 100644 index 8358efee..00000000 --- a/app/Api/CommentApi.php +++ /dev/null @@ -1,54 +0,0 @@ -commentModel->getById($comment_id); - } - - public function getAllComments($task_id) - { - return $this->commentModel->getAll($task_id); - } - - public function removeComment($comment_id) - { - return $this->commentModel->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->commentModel->create($values) : false; - } - - public function updateComment($id, $content) - { - $values = array( - 'id' => $id, - 'comment' => $content, - ); - - list($valid, ) = $this->commentValidator->validateModification($values); - return $valid && $this->commentModel->update($values); - } -} -- cgit v1.2.3