ComunicWeb/assets/js/components/like/interface.js

25 lines
437 B
JavaScript
Raw Permalink Normal View History

2017-12-29 08:58:40 +00:00
/**
* Likes API interface
*
* @author Pierre HUBERT
*/
ComunicWeb.components.like.interface = {
/**
* Update like status
*
* @param {String} type The type of component
* @param {Integer} id The ID of the element
* @param {Boolean} like New like status
*/
update: function(type, id, like){
2020-03-31 14:41:23 +00:00
//Perform an API request through websocket
return ws("likes/update", {
2017-12-29 08:58:40 +00:00
type: type,
id: id,
like: like
2020-03-31 14:41:23 +00:00
});
2017-12-29 08:58:40 +00:00
}
}