2018-01-18 05:53:00 +00:00
|
|
|
/**
|
|
|
|
* Comments interface with the server
|
|
|
|
*
|
|
|
|
* @author Pierre HUBERT
|
|
|
|
*/
|
|
|
|
|
|
|
|
ComunicWeb.components.comments.interface = {
|
|
|
|
|
2018-01-23 05:49:19 +00:00
|
|
|
/**
|
|
|
|
* Delete a comment
|
|
|
|
*
|
|
|
|
* @param {number} commentID The ID of the comment to delete
|
|
|
|
* @param {function} callback What to do once the comment has been delete
|
|
|
|
*/
|
|
|
|
delete: function(commentID, callback){
|
|
|
|
|
|
|
|
//Perform a request on the API
|
|
|
|
var apiURI = "comments/delete";
|
|
|
|
var params = {
|
|
|
|
commentID: commentID
|
|
|
|
};
|
|
|
|
|
|
|
|
//Make the request
|
|
|
|
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-01-18 05:53:00 +00:00
|
|
|
};
|