Can get informations about a single comment.

This commit is contained in:
Pierre 2018-01-27 18:39:08 +01:00
parent ddd0421592
commit bb0dc94d96

View File

@ -7,6 +7,27 @@
class commentsController {
/**
* Get informations about a single comment
*
* @url POST /comments/get_single
*/
public function get_single_infos(){
//Get the comment ID
$commentID = getPostCommentIDWithAccess("commentID");
//Get informations about the comment
$infos = components()->comments->get_single($commentID, TRUE);
//Check for errors
if(count($infos) == 0)
Rest_fatal_error(500, "Couldn't fetch informations about the comment !");
//Return informations about the comment
return $infos;
}
/**
* Edit a comment content
*