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

Commit

Permalink
Added simple GET without params.
Browse files Browse the repository at this point in the history
  • Loading branch information
aandis committed Feb 3, 2016
1 parent 7294996 commit 5aeecca
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions www/~/%username/payment-instruction.json.spt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
""" Get or change authenticated user's subscriptions.
"""
from aspen import Response

[--------------------------------------------------------]

if user.ANON:
raise Response(403, _("Please sign in first."))

else:
participant = user.participant

if request.method == 'GET':
subscriptions, totals = participant.get_giving_for_profile()
out = []
for s in subscriptions:
out.append({ "team_slug": s.team_slug,
"team_name": s.team_name,
"amount": str(s.amount),
"due": str(s.due),
"ctime": s.ctime,
"mtime": s.mtime
})

[---] application/json
out

0 comments on commit 5aeecca

Please sign in to comment.