From f9de5e2afeb59cad78d8a5ed4049f728360cfdfa Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 15 Sep 2021 07:49:36 +0200 Subject: [PATCH] fd --- files/routes/settings.py | 9 ++++++--- files/templates/default.html | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/files/routes/settings.py b/files/routes/settings.py index b51ac9a726..21d53db916 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -287,8 +287,11 @@ def themecolor(v): @auth_required @validate_formkey def gumroad(v): + if 'rdrama' in request.host: patron = 'Paypig' + else: patron = 'Patron' + if not (v.email and v.is_activated): - return {"error": "You must have a verified email to verify patron status and claim awards"}, 400 + return {"error": f"You must have a verified email to verify {patron} status and claim your rewards"}, 400 data = { 'access_token': GUMROAD_TOKEN, @@ -302,7 +305,7 @@ def gumroad(v): response = response[0] tier = tiers[response["variants_and_quantity"]] if v.patron == tier: - return {"error": "Patron awards already claimed"}, 400 + return {"error": f"{patron} rewards already claimed"}, 400 v.patron = tier @@ -354,7 +357,7 @@ def gumroad(v): g.db.add(new_badge) g.db.add(v) - return {"message": "Patron awards claimed"} + return {"message": f"{patron} rewards claimed!"} @app.post("/settings/titlecolor") @auth_required diff --git a/files/templates/default.html b/files/templates/default.html index 58210f9008..882b8d3c05 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -1374,6 +1374,12 @@ {% endif %} +
+
+
+
+
+