Add channel module wrapping our various JSON requests to the server.

(imported from commit 6489938678551ad8594822363ae6d1c9ae295496)
This commit is contained in:
Tim Abbott
2013-12-18 13:55:18 -05:00
parent 8c6ac1288d
commit 795930c803
17 changed files with 92 additions and 124 deletions

View File

@@ -73,10 +73,8 @@ $(function () {
var validator = $("#referral-form").validate({
errorClass: 'text-error',
submitHandler: function () {
$.ajax({
type: "POST",
channel.post({
url: "/json/refer_friend",
dataType: "json",
data: { email: $("#referral-form input").val() },
error: function () {
// We ignore errors from the server because