summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-05-04 22:30:44 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-05-04 22:30:44 +0200
commit8fc264f11b60884da9288299b6950ece1cf749f1 (patch)
tree7185fc6efd89ed8a88ba8d4b0a17ee57e0389e4f /index.html
parentfc737edb1e62fb298a429b6c8a484a3829031866 (diff)
downloadbridge-8fc264f11b60884da9288299b6950ece1cf749f1.tar.gz
bridge-8fc264f11b60884da9288299b6950ece1cf749f1.zip
add endpoint for team crunching
Diffstat (limited to 'index.html')
-rw-r--r--index.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/index.html b/index.html
index 8a699cc..f8d1c56 100644
--- a/index.html
+++ b/index.html
@@ -33,6 +33,12 @@
</form>
</p>
<p>
+ <form id="crunch-team-form">
+ <input type="text" id="crunch-team">
+ <input type="submit" value="Crunch Team by ID">
+ </form>
+ </p>
+ <p>
<form id="crunchglobal-form">
<input type="checkbox" id="crunch-force">
<label for="crunch-force">Force recrunch</label>
@@ -146,6 +152,11 @@
const ign = $("#crunch-name").val();
$.post("/api/player/" + ign + "/crunch");
});
+ $("#crunch-team-form").submit((e) => {
+ e.preventDefault();
+ const id = $("#crunch-team").val();
+ $.post("/api/team/" + id + "/crunch");
+ });
$("#crunchglobal-form").submit((e) => {
const force = $("#crunch-force").is(":checked");
e.preventDefault();