forked from rDrama/rDrama
1
0
Fork 0

twentyone: set xhr header so we get errors back as JSON

master
justcool393 2022-11-01 16:34:19 -05:00
parent 0dd956ae0e
commit 15460fb6e7
1 changed files with 1 additions and 0 deletions

View File

@ -4,6 +4,7 @@
<script>
function makeBlackjackRequest(action) {
const xhr = new XMLHttpRequest();
xhr.setRequestHeader('xhr', 'xhr');
xhr.open("post", `/casino/twentyone/${action}`);
xhr.onload = handleBlackjackResponse.bind(null, xhr);
xhr.blackjackAction = action;