From e68567c3a53c35d7bf913ab341789ed0dc9cc010 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 18 Nov 2023 19:20:03 +0200 Subject: [PATCH] use _ instead of - in URLs --- files/assets/js/casino/blackjack_screen.js | 8 ++++---- files/assets/js/casino/roulette_screen.js | 2 +- files/routes/awards.py | 2 +- files/routes/casino.py | 6 +++--- files/templates/shop.html | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/files/assets/js/casino/blackjack_screen.js b/files/assets/js/casino/blackjack_screen.js index 68e8ee1dcf..986a759f69 100644 --- a/files/assets/js/casino/blackjack_screen.js +++ b/files/assets/js/casino/blackjack_screen.js @@ -36,8 +36,8 @@ function handleBlackjackResponse(xhr) { deal: "Unable to deal a new hand. Is one in progress?", hit: "Unable to hit.", stay: "Unable to stay.", - "double-down": "Unable to double down.", - "buy-insurance": "Unable to buy insurance.", + "double_down": "Unable to double down.", + "buy_insurance": "Unable to buy insurance.", "split": "Unable to split" }; result = results[xhr.blackjackAction]; @@ -237,7 +237,7 @@ function staySplit() { } function doubleDown() { - const request = makeBlackjackRequest('double-down'); + const request = makeBlackjackRequest('double_down'); const form = new FormData(); form.append("formkey", formkey()); request.send(form); @@ -246,7 +246,7 @@ function doubleDown() { } function buyInsurance() { - const request = makeBlackjackRequest('buy-insurance'); + const request = makeBlackjackRequest('buy_insurance'); const form = new FormData(); form.append("formkey", formkey()); request.send(form); diff --git a/files/assets/js/casino/roulette_screen.js b/files/assets/js/casino/roulette_screen.js index ed229abbb9..3f43eef3e9 100644 --- a/files/assets/js/casino/roulette_screen.js +++ b/files/assets/js/casino/roulette_screen.js @@ -317,7 +317,7 @@ function placeChip(bet, which) { if (confirmed) { const xhr = new XMLHttpRequest(); - xhr.open("post", "/casino/roulette/place-bet"); + xhr.open("post", "/casino/roulette/place_bet"); xhr.setRequestHeader('xhr', 'xhr'); xhr.onload = handleRouletteResponse.bind(null, xhr); diff --git a/files/routes/awards.py b/files/routes/awards.py index 05857bedff..d2497c0d75 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -634,7 +634,7 @@ def award_thing(v, thing_type, id): return {"message": f"{award_title} award given to {thing_type} successfully!"} -@app.post("/trick-or-treat") +@app.post("/trick_or_treat") @limiter.limit("1/hour", key_func=lambda:f'{SITE}-{session.get("lo_user")}') @auth_required def trick_or_treat(v): diff --git a/files/routes/casino.py b/files/routes/casino.py index 3a9249e7a9..e8fb580270 100644 --- a/files/routes/casino.py +++ b/files/routes/casino.py @@ -173,7 +173,7 @@ def blackjack_player_stay(v): abort(400, "Unable to stay!") -@app.post("/casino/twentyone/double-down") +@app.post("/casino/twentyone/double_down") @limiter.limit('1/second', scope=rpath) @limiter.limit('1/second', scope=rpath, key_func=get_ID) @limiter.limit(CASINO_RATELIMIT, deduct_when=lambda response: response.status_code < 400) @@ -191,7 +191,7 @@ def blackjack_player_doubled_down(v): abort(400, "Unable to double down!") -@app.post("/casino/twentyone/buy-insurance") +@app.post("/casino/twentyone/buy_insurance") @limiter.limit('1/second', scope=rpath) @limiter.limit('1/second', scope=rpath, key_func=get_ID) @limiter.limit(CASINO_RATELIMIT, deduct_when=lambda response: response.status_code < 400) @@ -239,7 +239,7 @@ def roulette_get_bets(v): return {"success": True, "bets": bets, "gambler": {"coins": v.coins, "marseybux": v.marseybux}} -@app.post("/casino/roulette/place-bet") +@app.post("/casino/roulette/place_bet") @limiter.limit('1/second', scope=rpath) @limiter.limit('1/second', scope=rpath, key_func=get_ID) @limiter.limit(CASINO_RATELIMIT, deduct_when=lambda response: response.status_code < 400) diff --git a/files/templates/shop.html b/files/templates/shop.html index b88d82bb0b..1107c0b1f3 100644 --- a/files/templates/shop.html +++ b/files/templates/shop.html @@ -41,7 +41,7 @@ {% if IS_HOMOWEEN() %}
- twink or treat + twink or treat
{% endif %}