upvote/downvote/unvote socket calls

v1.18.x
psychobunny 11 years ago
parent 71c64de8bb
commit 60ec23b200

@ -73,6 +73,24 @@ SocketPosts.reply = function(socket, data, callback) {
});
};
SocketPosts.upvote = function(socket, data) {
if(data && data.pid && data.room_id) {
favourites.upvote(data.pid, data.room_id, socket.uid, socket);
}
};
SocketPosts.downvote = function(socket, data) {
if(data && data.pid && data.room_id) {
favourites.downvote(data.pid, data.room_id, socket.uid, socket);
}
};
SocketPosts.unvote = function(socket, data) {
if(data && data.pid && data.room_id) {
favourites.unvote(data.pid, data.room_id, socket.uid, socket);
}
};
SocketPosts.favourite = function(socket, data) {
if(data && data.pid && data.room_id) {
favourites.favourite(data.pid, data.room_id, socket.uid, socket);

Loading…
Cancel
Save