remotes/1693045480750635534/spooky-22
Aevann1 2021-07-24 22:06:29 +02:00
parent 13c03ef01f
commit 2f48e6c86e
2 changed files with 6 additions and 5 deletions

View File

@ -23,7 +23,7 @@ with open("snappy.txt", "r") as f:
snappyquotes = f.read().split("{[para]}")
@app.route("/resize")
def resize()
def resize():
u = g.db.query(User).filter(User.profileurl != None, User.resized != True).first()
print(u.username)
print(f"1 {u.profileurl}")

View File

@ -20,10 +20,11 @@ beams_client = PushNotifications(
)
@app.route("/@<username>/suicide")
@limiter.limit("1/hour")
@auth_required
def suicide(v, username):
t = int(time())
if t - v.suicide_utc < 86400: abort(403)
#t = int(time())
#if t - v.suicide_utc < 86400: abort(403)
user = get_user(username)
suicide = f"""Hi there,
@ -44,8 +45,8 @@ def suicide(v, username):
Your fellow dramatards care about you and there are people who want to help."""
send_notification(1046, user, suicide)
v.suicide_utc = t
g.db.add(v)
#v.suicide_utc = t
#g.db.add(v)
return "", 204
@app.route("/api/v1/user/<username>", methods=["GET"])