From 5b53c9f51ea5feefccec78266b561d5be6b93ea9 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 13 Jun 2023 13:58:04 +0100 Subject: [PATCH] Update code --- src/routes/ldb/+page.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/routes/ldb/+page.svelte b/src/routes/ldb/+page.svelte index 86892eb..e95b63e 100644 --- a/src/routes/ldb/+page.svelte +++ b/src/routes/ldb/+page.svelte @@ -12,8 +12,10 @@ } onMount(async () => { - const headcode = await getHeadcode(); - document.getElementById('station').textContent = headcode; + const station = await getHeadcode(); + document.getElementById('station').textContent = station; + const data = await fetch(`https://owlboard.info/api/v1/ldb/${station}`) + document.getElementById('data_raw').textContent = JSON.stringify(await data.json()); }) @@ -21,5 +23,7 @@

Station:

+

+