From 42175df1260350a136c17a0b0d45962a5827fbf1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 21 Sep 2021 23:06:48 +0200 Subject: [PATCH] fd] --- files/routes/admin.py | 3 +-- files/routes/settings.py | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 80285cc07..401fc6690 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -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 = {} diff --git a/files/routes/settings.py b/files/routes/settings.py index 85bbf937c..611418fdc 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -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"]]