From 7bf7a9a8363cf8be1f6bbf869803089c56d865c3 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Fri, 29 Jun 2012 09:39:46 -0400 Subject: [PATCH] Convert tip.json to POST (#88) --- www/%participant_id/tip.json | 4 ++-- www/assets/%version/gittip.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/www/%participant_id/tip.json b/www/%participant_id/tip.json index c0cdf16340..ce1009ac0c 100644 --- a/www/%participant_id/tip.json +++ b/www/%participant_id/tip.json @@ -45,9 +45,9 @@ if not user.ANON: # ===================== # Insert instead of update. The analytics may be interesting some day. - if 'amount' in qs: + if POST and 'amount' in body: try: - amount = decimal.Decimal(qs['amount']) + amount = decimal.Decimal(body['amount']) if amount not in AMOUNTS: raise ValueError except (decimal.InvalidOperation, ValueError): diff --git a/www/assets/%version/gittip.js b/www/assets/%version/gittip.js index 357b73a424..9939d28b79 100644 --- a/www/assets/%version/gittip.js +++ b/www/assets/%version/gittip.js @@ -334,7 +334,7 @@ Gittip.initTipButtons = function() jQuery.ajax( { url: '/' + tippee + '/tip.json' , data: {amount: amount} - , type: "GET" + , type: "POST" , error: function(x,y,z) { select(cur); console.log(x,y,z); }