From 5b896fb75e6457289aef763616bf92e8d613985c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 23 Nov 2021 21:54:40 +0200 Subject: [PATCH] dsdsaasd' --- files/routes/comments.py | 10 +++++----- files/routes/posts.py | 10 +++++----- files/templates/log.html | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index cd7e22b24..512dde20a 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -138,11 +138,6 @@ def api_comment(v): if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413 elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413 - if v.agendaposter and random.randint(1, 10) < 7: - if request.host == 'rdrama.net': - return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480'])) - return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019') - parent_submission = request.values.get("submission").strip() parent_fullname = request.values.get("parent_fullname").strip() @@ -591,6 +586,11 @@ def api_comment(v): g.db.commit() + if v.agendaposter and random.randint(1, 10) < 7: + if request.host == 'rdrama.net': + return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480'])) + return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019') + if request.headers.get("Authorization"): return c.json else: return render_template("comments.html", v=v, comments=[c]) diff --git a/files/routes/posts.py b/files/routes/posts.py index 92e787c41..caf714d93 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -525,11 +525,6 @@ def submit_post(v): if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413 elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413 - if v.agendaposter and random.randint(1, 10) < 7: - if request.host == 'rdrama.net': - return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480'])) - return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019') - title = request.values.get("title", "").strip() url = request.values.get("url", "").strip() title_html = filter_title(title) @@ -973,6 +968,11 @@ def submit_post(v): g.db.commit() + if v.agendaposter and random.randint(1, 10) < 7: + if request.host == 'rdrama.net': + return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480'])) + return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019') + if request.headers.get("Authorization"): return new_post.json else: return redirect(new_post.permalink) diff --git a/files/templates/log.html b/files/templates/log.html index 94d6951e9..4231b8443 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -117,14 +117,14 @@