From 755132693658abe1a3ca81309d440f8b8f5698dd Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 6 Oct 2021 01:24:09 +0200 Subject: [PATCH] dfsfds --- files/routes/votes.py | 1 + files/templates/comments.html | 2 +- files/templates/delete_post_modal.html | 8 ++------ files/templates/submission.html | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/files/routes/votes.py b/files/routes/votes.py index aa76f21ce..d1861378b 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -165,6 +165,7 @@ def api_vote_comment(comment_id, new, v): @app.post("/vote/poll/") @auth_required +@validate_formkey def api_vote_poll(comment_id, v): vote = request.values.get("vote") diff --git a/files/templates/comments.html b/files/templates/comments.html index 0237b8eae..db4f368ca 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -33,7 +33,7 @@ {% if v %} {% include "award_modal.html" %} - + {% endif %} diff --git a/files/templates/delete_post_modal.html b/files/templates/delete_post_modal.html index d972a570d..d4cf2592f 100644 --- a/files/templates/delete_post_modal.html +++ b/files/templates/delete_post_modal.html @@ -22,12 +22,8 @@ this.innerHTML='Deleting post'; this.disabled = true; - post('/delete_post/' + id, - callback = function() { - - location.reload(); - } - ) + post('/delete_post/' + id); + location.reload(); } document.getElementById("deletePostButton-mobile").onclick = delete_post; diff --git a/files/templates/submission.html b/files/templates/submission.html index 743cb5f9c..fec5f067a 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -36,7 +36,7 @@ {% if 'rdrama' not in request.host %} {% if v %} - + {% include "award_modal.html" %} {% include "emoji_modal.html" %} {% include "gif_modal.html" %}