dfg
This commit is contained in:
parent
fe1c3ff7f7
commit
75a6177f40
1 changed files with 4 additions and 1 deletions
|
@ -68,7 +68,10 @@ def stats():
|
|||
active_users = set()
|
||||
posters = g.db.query(Submission.author_id).distinct(Submission.author_id).filter(Submission.created_utc > week).all()
|
||||
commenters = g.db.query(Comment.author_id).distinct(Comment.author_id).filter(Comment.created_utc > week).all()
|
||||
active_users = set(posters) | set(commenters)
|
||||
voters = g.db.query(Vote.author_id).distinct(Vote.author_id).filter(Vote.created_utc > week).all()
|
||||
commentvoters = g.db.query(CommentVote.author_id).distinct(CommentVote.author_id).filter(CommentVote.created_utc > week).all()
|
||||
|
||||
active_users = set(posters) | set(commenters) | set(voteres) | set(commentvoters)
|
||||
|
||||
return {"marseys": g.db.query(Marsey.name).count(),
|
||||
"users": g.db.query(User.id).count(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue