forked from rDrama/rDrama
dfsfds
parent
6fd16f71b0
commit
3bfdddb632
|
@ -24,7 +24,7 @@ SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||||
def votes2(v, id):
|
def votes2(v, id):
|
||||||
try: id = int(id)
|
try: id = int(id)
|
||||||
except: abort(400)
|
except: abort(400)
|
||||||
votes = g.db.query(Vote.user_id).join(Submission, Vote.submission_id==Submission.id).filter(Vote.vote_type==1, Submission.author_id==id).group_by(Vote.user_id).order_by(func.count(Vote.user_id).desc()).all()
|
votes = g.db.query(Vote.user_id).join(Submission, Vote.submission_id==Submission.id).filter(Vote.vote_type==1, Submission.author_id==id).group_by(Vote.user_id).order_by(func.count(Vote.user_id).desc()).limit(25).all()
|
||||||
|
|
||||||
voters=[x[0] for x in votes]
|
voters=[x[0] for x in votes]
|
||||||
users = g.db.query(User.id, User.username).filter(User.id.in_(voters)).all()
|
users = g.db.query(User.id, User.username).filter(User.id.in_(voters)).all()
|
||||||
|
|
Loading…
Reference in New Issue