forked from rDrama/rDrama
fd]
parent
65525a23f3
commit
42175df126
|
@ -184,7 +184,7 @@ def monthly(v):
|
||||||
grant_awards["shit"] = 10
|
grant_awards["shit"] = 10
|
||||||
grant_awards["fireflies"] = 10
|
grant_awards["fireflies"] = 10
|
||||||
grant_awards["ban"] = 3
|
grant_awards["ban"] = 3
|
||||||
elif u.patron == 5:
|
elif u.patron == 5 or u.patron == 8:
|
||||||
grant_awards["shit"] = 20
|
grant_awards["shit"] = 20
|
||||||
grant_awards["fireflies"] = 20
|
grant_awards["fireflies"] = 20
|
||||||
grant_awards["ban"] = 6
|
grant_awards["ban"] = 6
|
||||||
|
@ -403,7 +403,6 @@ def badge_grant_post(v):
|
||||||
g.db.query(Badge).options(lazyload('*')).filter_by(badge_id=17, user_id=user.id).delete()
|
g.db.query(Badge).options(lazyload('*')).filter_by(badge_id=17, user_id=user.id).delete()
|
||||||
|
|
||||||
elif badge_id in [21,22,23,24,25,28]:
|
elif badge_id in [21,22,23,24,25,28]:
|
||||||
if badge_id == 28: badge_id = 25
|
|
||||||
user.patron = int(str(badge_id)[-1])
|
user.patron = int(str(badge_id)[-1])
|
||||||
|
|
||||||
grant_awards = {}
|
grant_awards = {}
|
||||||
|
|
|
@ -288,8 +288,7 @@ def gumroad(v):
|
||||||
if 'rdrama' in request.host: patron = 'Paypig'
|
if 'rdrama' in request.host: patron = 'Paypig'
|
||||||
else: patron = 'Patron'
|
else: patron = 'Patron'
|
||||||
|
|
||||||
if not (v.email and v.is_activated):
|
if not (v.email and v.is_activated): return {"error": f"You must have a verified email to verify {patron} status and claim your rewards"}, 400
|
||||||
return {"error": f"You must have a verified email to verify {patron} status and claim your rewards"}, 400
|
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
'access_token': GUMROAD_TOKEN,
|
'access_token': GUMROAD_TOKEN,
|
||||||
|
@ -297,8 +296,7 @@ def gumroad(v):
|
||||||
}
|
}
|
||||||
response = requests.get('https://api.gumroad.com/v2/sales', data=data).json()["sales"]
|
response = requests.get('https://api.gumroad.com/v2/sales', data=data).json()["sales"]
|
||||||
|
|
||||||
if len(response) == 0:
|
if len(response) == 0: return {"error": "Email not found"}, 404
|
||||||
return {"error": "Email not found"}, 404
|
|
||||||
|
|
||||||
response = response[0]
|
response = response[0]
|
||||||
tier = tiers[response["variants_and_quantity"]]
|
tier = tiers[response["variants_and_quantity"]]
|
||||||
|
|
Loading…
Reference in New Issue