mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Update likes through websocket request
This commit is contained in:
parent
7935f8a3ce
commit
5eee376136
@ -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);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user