master
Aevann1 2021-12-11 04:32:21 +02:00
parent 34657d207d
commit 667083f387
1 changed files with 7 additions and 2 deletions

View File

@ -246,10 +246,15 @@ def bet(comment_id, v):
vote = CommentVote(user_id=v.id, vote_type=1, comment_id=comment.id)
g.db.add(vote)
v.coins -= 200
g.db.add(v)
comment.upvotes += 1
g.db.add(comment)
v.coins -= 200
g.db.add(v)
autobetter = g.db.query(User).filter_by(id=AUTOBETTER_ID).first()
autobetter.coins += 200
g.db.add(autobetter)
g.db.commit()
return "", 204