ComunicWeb/assets/js/components/comments/interface.js

28 lines
550 B
JavaScript
Raw Normal View History

2018-01-18 05:53:00 +00:00
/**
* Comments interface with the server
*
* @author Pierre HUBERT
*/
ComunicWeb.components.comments.interface = {
/**
* 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
};