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