master
Aevann1 2022-02-06 12:49:24 +02:00
parent 4c7f194067
commit e4b1dde431
3 changed files with 7 additions and 7 deletions

View File

@ -582,4 +582,7 @@ ROLES={
"4": "868140288013664296",
"5": "880445545771044884",
"8": "886781932430565418",
}
}
if SITE_NAME == 'Drama': patron = 'Paypig'
else: patron = 'Patron'

View File

@ -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', '')

View File

@ -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)