forked from MarseyWorld/MarseyWorld
fdssdf
parent
e138aab369
commit
7e851f38db
|
@ -8,7 +8,7 @@ services:
|
|||
- "./:/service"
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://postgres@postgres:5432
|
||||
- MASTER_KEY=${MASTER_KEY:XuxGqp5NyygJrM24b5gt3YgyvFVGdQnwVDwLzLwpu3eQwY}
|
||||
- MASTER_KEY=XuxGqp5NyygJrM24b5gt3YgyvFVGdQnwVDwLzLwpu3eQwY
|
||||
- REDIS_URL=redis://redis
|
||||
- DOMAIN=127.0.0.1
|
||||
- SITE_NAME=Drama
|
||||
|
|
|
@ -19,14 +19,13 @@ from files.helpers.discord import add_role
|
|||
|
||||
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||
|
||||
@app.get("/votes2")
|
||||
@app.get("/upvoters/<id>")
|
||||
@admin_level_required(6)
|
||||
def votes2(v):
|
||||
votes = g.db.query(Votes).join(Submission, Vote.submission_id==Submission.id).filter(Submission.author_id==7)all()
|
||||
li = []
|
||||
for v in votes:
|
||||
li.append(v.user_id)
|
||||
return(str(li))
|
||||
def votes2(v, id):
|
||||
try: id = int(id)
|
||||
except: abort(400)
|
||||
votes = g.db.query(Vote.user_id, func.count(Vote.user_id)).join(Submission, Vote.submission_id==Submission.id).filter(Vote.vote_type==1, Submission.author_id==id).group_by(Vote.user_id).all()
|
||||
return(str(votes))
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue