rename truecoins -> truescore (#544)

This commit is contained in:
justcool393 2023-07-28 02:56:49 -07:00 committed by GitHub
parent 64880c87fa
commit 46714fd520
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 53 additions and 27 deletions

View file

@ -83,7 +83,7 @@ def api_vote_post(post_id, new, v):
# remove the old score data
if points_matter:
post.author.coins -= vote.vote_type
post.author.truecoins -= vote.vote_type
post.author.truescore -= vote.vote_type
# we'll be saving later anyway, so don't bother doing so here
else:
# create new vote data
@ -105,7 +105,7 @@ def api_vote_post(post_id, new, v):
# add relevant points
if points_matter:
post.author.coins += vote.vote_type
post.author.truecoins += vote.vote_type
post.author.truescore += vote.vote_type
# database it up
g.db.add(post.author)
@ -151,7 +151,7 @@ def api_vote_comment(comment_id, new, v):
# remove the old score data
if points_matter:
comment.author.coins -= vote.vote_type
comment.author.truecoins -= vote.vote_type
comment.author.truescore -= vote.vote_type
# we'll be saving later anyway, so don't bother doing so here
else:
# create new vote data
@ -173,7 +173,7 @@ def api_vote_comment(comment_id, new, v):
# add relevant points
if points_matter:
comment.author.coins += vote.vote_type
comment.author.truecoins += vote.vote_type
comment.author.truescore += vote.vote_type
# database it up
g.db.add(comment.author)