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 * @param {Boolean} like New like status
*/ */
update: function(type, id, like){ update: function(type, id, like){
//Perform an API request through websocket
//Perform an API request return ws("likes/update", {
var apiURI = "likes/update";
var params = {
type: type, type: type,
id: id, id: id,
like: like like: like
}; });
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true);
} }
} }