mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 13:59:23 +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
|
* @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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user