remotes/1693045480750635534/spooky-22
Aevann1 2021-09-21 23:06:48 +02:00
parent 65525a23f3
commit 42175df126
2 changed files with 3 additions and 6 deletions

View File

@ -184,7 +184,7 @@ def monthly(v):
grant_awards["shit"] = 10
grant_awards["fireflies"] = 10
grant_awards["ban"] = 3
elif u.patron == 5:
elif u.patron == 5 or u.patron == 8:
grant_awards["shit"] = 20
grant_awards["fireflies"] = 20
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()
elif badge_id in [21,22,23,24,25,28]:
if badge_id == 28: badge_id = 25
user.patron = int(str(badge_id)[-1])
grant_awards = {}

View File

@ -288,8 +288,7 @@ def gumroad(v):
if 'rdrama' in request.host: patron = 'Paypig'
else: patron = 'Patron'
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
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
data = {
'access_token': GUMROAD_TOKEN,
@ -297,8 +296,7 @@ def gumroad(v):
}
response = requests.get('https://api.gumroad.com/v2/sales', data=data).json()["sales"]
if len(response) == 0:
return {"error": "Email not found"}, 404
if len(response) == 0: return {"error": "Email not found"}, 404
response = response[0]
tier = tiers[response["variants_and_quantity"]]