From 135bd2c60c566bb01b5449cd3c7454b4bda74086 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 14 Sep 2022 11:20:59 +0200 Subject: [PATCH] remove unnecessary gay shit --- files/routes/votes.py | 14 -------------- files/templates/votes.html | 5 ----- 2 files changed, 19 deletions(-) diff --git a/files/routes/votes.py b/files/routes/votes.py index bb17cadf9a..513f3572f2 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -34,20 +34,6 @@ def vote_info_get(v, link): downs = g.db.query(CommentVote).filter_by(comment_id=thing_id, vote_type=-1 ).order_by(CommentVote.created_utc).all() - if v.admin_level: - up_ids = [x[0] for x in g.db.query(CommentVote.user_id).filter_by(comment_id=thing_id, vote_type=1).order_by(CommentVote.created_utc).all()] - total_ups = g.db.query(func.sum(User.truecoins)).filter(User.id.in_(up_ids)).scalar() - total_ups = format(total_ups, ",") if total_ups else '0' - patrons_ups = g.db.query(User).filter(User.id.in_(up_ids), User.patron > 0).count() - - return render_template("votes.html", - v=v, - thing=thing, - ups=ups, - downs=downs, - total_ups=total_ups, - patrons_ups=patrons_ups) - else: abort(400) return render_template("votes.html", diff --git a/files/templates/votes.html b/files/templates/votes.html index 37b337b079..da986cb7fa 100644 --- a/files/templates/votes.html +++ b/files/templates/votes.html @@ -20,11 +20,6 @@

Upvotes: {{ups | length}}

Downvotes: {{downs | length}}

-{% if v.admin_level and (total_ups and patrons_ups) %} -

Total Truescore: {{total_ups}}

-

Total Paypigs: {{patrons_ups}}

-{% endif %} -

Upvotes