From aacbff8ecc564a98682704c3f8ab97f1810cd551 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 12 Oct 2021 15:50:13 +0200 Subject: [PATCH] gfd --- files/routes/posts.py | 4 ++-- files/templates/admin/banned_domains.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index ee9ff6cd7..edd35bc37 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -532,8 +532,8 @@ def submit_post(v): domain_obj = get_domain(domain) if domain_obj: - if request.headers.get("Authorization"): return {"error":"ToS violation"}, 400 - else: return render_template("submit.html", v=v, error="ToS Violation", title=title, url=url, body=request.values.get("body", "")), 400 + if request.headers.get("Authorization"): return {"error":domain_obj.reason}, 400 + else: return render_template("submit.html", v=v, error=domain_obj.reason, title=title, url=url, body=request.values.get("body", "")), 400 elif "twitter.com" in domain: try: embed = requests.get("https://publish.twitter.com/oembed", params={"url":url, "omit_script":"t"}).json()["html"] except: embed = None diff --git a/files/templates/admin/banned_domains.html b/files/templates/admin/banned_domains.html index e004ac821..dc931c16b 100644 --- a/files/templates/admin/banned_domains.html +++ b/files/templates/admin/banned_domains.html @@ -30,8 +30,8 @@
- - + +
{% endblock %} \ No newline at end of file