master
Aevann1 2022-01-12 06:24:05 +02:00
parent b6163c58a1
commit d19fcf85eb
2 changed files with 5 additions and 5 deletions

View File

@ -207,7 +207,7 @@ def monthly(v):
emails = [x['email'] for x in requests.get(f'https://api.gumroad.com/v2/products/{GUMROAD_ID}/subscribers', data=data, timeout=5).json()["subscribers"]]
for u in g.db.query(User).filter(User.patron).all():
for u in g.db.query(User).filter(User.patron > 0).all():
if u.patron == 5 or u.email and u.email.lower() in emails or u.id == 1379:
if u.patron == 1: procoins = 2500
elif u.patron == 2: procoins = 5000

View File

@ -190,7 +190,7 @@ def steal(v):
@app.get("/rentoids")
@auth_required
def rentoids(v):
users = g.db.query(User).filter(User.rent_utc).all()
users = g.db.query(User).filter(User.rent_utc > 0).all()
if not v or v.oldsite: template = ''
else: template = 'CHRISTMAS/'
return render_template(f"{template}rentoids.html", v=v, users=users)
@ -199,9 +199,9 @@ def rentoids(v):
@app.get("/thiefs")
@auth_required
def thiefs(v):
successful = g.db.query(User).filter(User.steal_utc).all()
failed = g.db.query(User).filter(User.fail_utc).all()
failed2 = g.db.query(User).filter(User.fail2_utc).all()
successful = g.db.query(User).filter(User.steal_utc > 0).all()
failed = g.db.query(User).filter(User.fail_utc > 0).all()
failed2 = g.db.query(User).filter(User.fail2_utc > 0).all()
if not v or v.oldsite: template = ''
else: template = 'CHRISTMAS/'
return render_template(f"{template}thiefs.html", v=v, successful=successful, failed=failed, failed2=failed2)