From 1b94a1b1c2d55750fef0f75cf14c4def351dc3bf Mon Sep 17 00:00:00 2001 From: Pierre Date: Sat, 27 Jan 2018 18:30:27 +0100 Subject: [PATCH] Get informations about a single comment. --- assets/js/components/comments/interface.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/assets/js/components/comments/interface.js b/assets/js/components/comments/interface.js index 47f9d985..6774bddb 100644 --- a/assets/js/components/comments/interface.js +++ b/assets/js/components/comments/interface.js @@ -6,6 +6,25 @@ ComunicWeb.components.comments.interface = { + /** + * Get informations about a single comment + * + * @param {number} commentID The ID of the comment to get + * @param {function} callback + */ + get_single: function(commentID, callback) { + + //Perform a request on the API + var apiURI = "comments/get_single"; + var params = { + commentID: commentID + }; + + //Make the request + ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback); + + }, + /** * Update a comment content *