An actual minimum viable product, maybe? #11

Merged
andrewlalis merged 43 commits from develop into master 2018-10-12 18:19:41 +00:00
1 changed files with 16 additions and 0 deletions
Showing only changes of commit 83c2390f72 - Show all commits

View File

@ -3,10 +3,26 @@ $(function() {
$(".vote-up").click(function() { $(".vote-up").click(function() {
var reviewId = $(this).attr("data-review-id"); var reviewId = $(this).attr("data-review-id");
var data = {
'csrfmiddlewaretoken': csrftoken,
'helpful': true
};
// Vote up // Vote up
$.post(
'/api/postings/reviews/' + reviewId + '/helpful_vote',
data
);
}); });
$(".vote-down").click(function() { $(".vote-down").click(function() {
var review = $(this).attr("data-review-id"); var review = $(this).attr("data-review-id");
var data = {
'csrfmiddlewaretoken': csrftoken,
'helpful': false
};
// Vote down // Vote down
$.post(
'/api/postings/reviews/' + reviewId + '/helpful_vote',
data
);
}); });
}); });