diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-04 22:30:44 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-04 22:30:44 +0200 |
| commit | 8fc264f11b60884da9288299b6950ece1cf749f1 (patch) | |
| tree | 7185fc6efd89ed8a88ba8d4b0a17ee57e0389e4f /index.html | |
| parent | fc737edb1e62fb298a429b6c8a484a3829031866 (diff) | |
| download | bridge-8fc264f11b60884da9288299b6950ece1cf749f1.tar.gz bridge-8fc264f11b60884da9288299b6950ece1cf749f1.zip | |
add endpoint for team crunching
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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(); |
