forked from rDrama/rDrama
sdffds
parent
28b5288a10
commit
6e46f32e33
|
@ -530,8 +530,12 @@ def gumroad(v):
|
|||
|
||||
response = requests.get('https://api.gumroad.com/v2/sales', data=data, timeout=5).json()["sales"][0]
|
||||
tier = tiers[response["variants_and_quantity"]]
|
||||
|
||||
if v.patron == tier: return {"error": f"{patron} rewards already claimed"}, 400
|
||||
|
||||
existing = g.db.query(User.id).filter_by(email=v.email, is_activated=True, patron=tier).one_or_none()
|
||||
if existing: return {"error": f"{patron} rewards already claimed on another account"}, 400
|
||||
|
||||
if v.patron:
|
||||
badge = v.has_badge(20+tier)
|
||||
if badge: g.db.delete(badge)
|
||||
|
|
Loading…
Reference in New Issue