From 905b07043709f12f26b95b14f014d2268ec5cf3c Mon Sep 17 00:00:00 2001 From: justcool393 Date: Tue, 1 Nov 2022 00:04:55 -0500 Subject: [PATCH] twentyone: ratelimits: put a once per 2 seconds ratelimit to patch up race conditions --- files/routes/casino.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/files/routes/casino.py b/files/routes/casino.py index 5e2644301..49c9b3181 100644 --- a/files/routes/casino.py +++ b/files/routes/casino.py @@ -109,7 +109,7 @@ def pull_slots(v): # 21 @app.post("/casino/twentyone/deal") -@limiter.limit("100/minute;2000/hour;12000/day") +@limiter.limit("1/2 seconds;100/minute;2000/hour;12000/day") @auth_required @feature_required('GAMBLING') def blackjack_deal_to_player(v): @@ -129,7 +129,7 @@ def blackjack_deal_to_player(v): @app.post("/casino/twentyone/hit") -@limiter.limit("100/minute;2000/hour;12000/day") +@limiter.limit("1/2 seconds;100/minute;2000/hour;12000/day") @auth_required @feature_required('GAMBLING') def blackjack_player_hit(v): @@ -145,7 +145,7 @@ def blackjack_player_hit(v): @app.post("/casino/twentyone/stay") -@limiter.limit("100/minute;2000/hour;12000/day") +@limiter.limit("1/2 seconds;100/minute;2000/hour;12000/day") @auth_required @feature_required('GAMBLING') def blackjack_player_stay(v): @@ -161,7 +161,7 @@ def blackjack_player_stay(v): @app.post("/casino/twentyone/double-down") -@limiter.limit("100/minute;2000/hour;12000/day") +@limiter.limit("1/2 seconds;100/minute;2000/hour;12000/day") @auth_required @feature_required('GAMBLING') def blackjack_player_doubled_down(v): @@ -177,7 +177,7 @@ def blackjack_player_doubled_down(v): @app.post("/casino/twentyone/buy-insurance") -@limiter.limit("100/minute;2000/hour;12000/day") +@limiter.limit("1/2 seconds;100/minute;2000/hour;12000/day") @auth_required @feature_required('GAMBLING') def blackjack_player_bought_insurance(v):