Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Convert tip.json to POST (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Jun 29, 2012
1 parent f5853d8 commit 7bf7a9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions www/%participant_id/tip.json
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion www/assets/%version/gittip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7bf7a9a

Please sign in to comment.