diff --git a/files/helpers/const.py b/files/helpers/const.py index 3c9751215..a975b0ae5 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -582,4 +582,7 @@ ROLES={ "4": "868140288013664296", "5": "880445545771044884", "8": "886781932430565418", - } \ No newline at end of file + } + +if SITE_NAME == 'Drama': patron = 'Paypig' +else: patron = 'Patron' \ No newline at end of file diff --git a/files/routes/posts.py b/files/routes/posts.py index 6155d33b4..4ff965f35 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -977,7 +977,7 @@ def submit_post(v, sub=None): body += f"\n\n{url}" else: if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": "Image/Video files only"}, 400 - return render_template("submit.html", v=v, error=f"Image/Video files only."), 400 + return render_template("submit.html", v=v, error="Image/Video files only."), 400 if '#fortune' in body: body = body.replace('#fortune', '') diff --git a/files/routes/settings.py b/files/routes/settings.py index 31c88ae2f..6fa0462e7 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -436,9 +436,6 @@ def themecolor(v): @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_required def gumroad(v): - if SITE_NAME == 'Drama': 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 @@ -735,14 +732,14 @@ def settings_css(v): @auth_required def settings_profilecss_get(v): - if not v.patron : return f"You must be a paypig to set profile css." + if not v.patron : return f"You must be a {patron} to set profile css." return render_template("settings_profilecss.html", v=v) @app.post("/settings/profilecss") @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_required def settings_profilecss(v): - if not v.patron: return f"You must be a paypig to set profile css." + if not v.patron: return f"You must be a {patron} to set profile css." profilecss = request.values.get("profilecss").strip().replace('\\', '').strip()[:4000] v.profilecss = profilecss g.db.add(v)