forked from MarseyWorld/MarseyWorld
use _ instead of - in URLs
parent
64df6a4036
commit
e68567c3a5
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
{% if IS_HOMOWEEN() %}
|
||||
<script defer src="{{'events/homoween/js/trickortreat.js' | asset}}"></script>
|
||||
<div class ="mb-2" style="text-align:center">
|
||||
<a id="trick-or-treat" class="btn btn-success triggerClass" role="button" data-nonce="{{g.nonce}}" data-onclick="postToastTrickOrTreat(this, '/trick-or-treat')"> twink or treat</a>
|
||||
<a id="trick-or-treat" class="btn btn-success triggerClass" role="button" data-nonce="{{g.nonce}}" data-onclick="postToastTrickOrTreat(this, '/trick_or_treat')"> twink or treat</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue