added csrf to ajax calls

This commit is contained in:
Baris Usakli
2013-06-20 16:29:44 -04:00
parent a32103efbe
commit 523b787e69
8 changed files with 31 additions and 23 deletions

View File

@@ -26,7 +26,8 @@
}
followBtn.on('click', function() {
$.post('/users/follow', {uid: theirid},
$.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();