changed most of the ajax calls to use sockets

This commit is contained in:
Baris Usakli
2013-07-10 11:20:31 -04:00
parent 79074fd597
commit 93653e88df
7 changed files with 81 additions and 74 deletions

View File

@@ -26,13 +26,9 @@
}
followBtn.on('click', function() {
$.post('/users/follow', {uid: theirid, _csrf:$('#csrf_token').val()},
function(data) {
followBtn.remove();
$('#user-action-alert').html('You are now following'+ $('.account-username').text() +'!').show();
}
);
followBtn.remove();
socket.emit('api:user.follow', {uid: theirid});
return false;
});