diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-03-05 12:10:41 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-03-05 12:10:41 +0100 |
commit | 47ec2c6721c53ab047c43d75b16fbec9f8db5750 (patch) | |
tree | b6a0a7bfa5559ad25d15da0f2708320b08e76f94 /web/pw-server/src/routes | |
parent | af04709fe16ea9463179a0c3c11d227e83b548d1 (diff) | |
download | planetwars.dev-47ec2c6721c53ab047c43d75b16fbec9f8db5750.tar.xz planetwars.dev-47ec2c6721c53ab047c43d75b16fbec9f8db5750.zip |
fix opponent selection
Diffstat (limited to 'web/pw-server/src/routes')
-rw-r--r-- | web/pw-server/src/routes/index.svelte | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/pw-server/src/routes/index.svelte b/web/pw-server/src/routes/index.svelte index b9e5c2e..dec3294 100644 --- a/web/pw-server/src/routes/index.svelte +++ b/web/pw-server/src/routes/index.svelte @@ -38,7 +38,8 @@ (editSession as any).on("change", debounce(saveCode, 2000)); } - async function submitBot() { + async function submitBot(e: CustomEvent) { + console.log(e.detail); let response = await fetch("/api/submit_bot", { method: "POST", headers: { @@ -46,6 +47,7 @@ }, body: JSON.stringify({ code: editSession.getDocument().getValue(), + opponent_name: e.detail["opponentName"], }), }); |