From 6a53fa206305d129ffc9f6d0b586c074da2015ee Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 2 Feb 2023 06:14:09 +0200 Subject: [PATCH] add some print statements to claim_rewards --- files/routes/users.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/files/routes/users.py b/files/routes/users.py index 70b6d31e6..62a49b368 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -1291,10 +1291,15 @@ def claim_rewards(v): transaction.claimed = True g.db.add(transaction) + print(f'{v.username}: {v.marseybux}', flush=True) v.pay_account('marseybux', marseybux) + print(f'{v.username}: {v.marseybux}', flush=True) + send_repeatable_notification(v.id, f"You have received {marseybux} Marseybux! You can use them to buy awards or hats in the [shop](/shop) or gamble them in the [casino](/casino).") g.db.add(v) + print(f'{v.username}: {v.patron}', flush=True) + if highest_tier > v.patron: v.patron = highest_tier v.patron_utc = time.time() + 2937600 @@ -1302,6 +1307,10 @@ def claim_rewards(v): g.db.delete(badge) badge_grant(badge_id=20+highest_tier, user=v) + print(f'{v.username}: {v.patron}', flush=True) + print(f'{v.username} rewards claimed successfully!', flush=True) + + KOFI_TOKEN = environ.get("KOFI_TOKEN", "").strip() if KOFI_TOKEN: @app.post("/kofi")