mirror of
https://git.ari.lt/ari.lt/ari.lt.git
synced 2025-02-05 01:59:25 +01:00
add flashing of comment vote status
Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
parent
e1b09fd02a
commit
e49bd6497b
1 changed files with 2 additions and 0 deletions
|
@ -445,4 +445,6 @@ def vote(mode: str, cid: int):
|
||||||
comment.score += 1 if mode == "up" else -1
|
comment.score += 1 if mode == "up" else -1
|
||||||
models.db.session.commit()
|
models.db.session.commit()
|
||||||
|
|
||||||
|
flask.flash(f"Voted {mode} for comment {comment.id}.")
|
||||||
|
|
||||||
return flask.redirect(flask.url_for("views.index", gb=comment.id))
|
return flask.redirect(flask.url_for("views.index", gb=comment.id))
|
||||||
|
|
Loading…
Add table
Reference in a new issue