add flashing of comment vote status

Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
Arija A. 2024-08-26 04:57:18 +03:00
parent e1b09fd02a
commit e49bd6497b

View file

@ -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))