From e49bd6497b2bf6e5f54d2eaef003b11e8ae83929 Mon Sep 17 00:00:00 2001 From: Ari Archer Date: Mon, 26 Aug 2024 04:57:18 +0300 Subject: [PATCH] add flashing of comment vote status Signed-off-by: Ari Archer --- src/aw/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/aw/views.py b/src/aw/views.py index 0610011..23f23c6 100644 --- a/src/aw/views.py +++ b/src/aw/views.py @@ -445,4 +445,6 @@ def vote(mode: str, cid: int): comment.score += 1 if mode == "up" else -1 models.db.session.commit() + flask.flash(f"Voted {mode} for comment {comment.id}.") + return flask.redirect(flask.url_for("views.index", gb=comment.id))