diff options
| author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-04-16 10:30:11 +0200 |
|---|---|---|
| committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-04-16 10:30:11 +0200 |
| commit | 39cec55bbe738a4c5f93913b9b016050a1953d10 (patch) | |
| tree | efebfc255ba0d865db41d4272facf12574d8bd07 /web/pw-server/src/routes | |
| parent | a41b4c48cb3fe56037aef62c4289435ede7d3e98 (diff) | |
| download | planetwars.dev-39cec55bbe738a4c5f93913b9b016050a1953d10.tar.xz planetwars.dev-39cec55bbe738a4c5f93913b9b016050a1953d10.zip | |
format & cleanup
Diffstat (limited to 'web/pw-server/src/routes')
| -rw-r--r-- | web/pw-server/src/routes/matches/new.svelte | 4 | ||||
| -rw-r--r-- | web/pw-server/src/routes/submission_matches/[match_id].svelte | 31 |
2 files changed, 2 insertions, 33 deletions
diff --git a/web/pw-server/src/routes/matches/new.svelte b/web/pw-server/src/routes/matches/new.svelte index eed3dbb..ebc0e15 100644 --- a/web/pw-server/src/routes/matches/new.svelte +++ b/web/pw-server/src/routes/matches/new.svelte @@ -28,7 +28,7 @@ <script lang="ts"> import Select from "svelte-select"; -import { goto } from "$app/navigation"; + import { goto } from "$app/navigation"; export let bots: object[]; let items: object[]; let players: object[] = []; @@ -65,7 +65,7 @@ import { goto } from "$app/navigation"; if (res.ok) { // TODO - goto("/matches") + goto("/matches"); } else { alert(res.statusText); } diff --git a/web/pw-server/src/routes/submission_matches/[match_id].svelte b/web/pw-server/src/routes/submission_matches/[match_id].svelte deleted file mode 100644 index 586b2c2..0000000 --- a/web/pw-server/src/routes/submission_matches/[match_id].svelte +++ /dev/null @@ -1,31 +0,0 @@ -<script lang="ts" context="module"> - export async function load({ page }) { - const res = await fetch(`/api/submission_match_log/${page.params["match_id"]}`, { - headers: { - "Content-Type": "application/json", - }, - }); - - if (res.ok) { - return { - props: { - matchLog: await res.text(), - }, - }; - } - - return { - status: res.status, - error: new Error("failed to load match"), - }; - } -</script> - -<script lang="ts"> - import Visualizer from "$lib/components/Visualizer.svelte"; - export let matchLog: string; -</script> - -<div> - <Visualizer {matchLog} /> -</div> |
