Update likes through websocket request

This commit is contained in:
Pierre HUBERT 2020-03-31 16:41:23 +02:00
parent 7935f8a3ce
commit 5eee376136

View File

@ -14,16 +14,12 @@ ComunicWeb.components.like.interface = {
* @param {Boolean} like New like status
*/
update: function(type, id, like){
//Perform an API request
var apiURI = "likes/update";
var params = {
//Perform an API request through websocket
return ws("likes/update", {
type: type,
id: id,
like: like
};
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true);
});
}
}