Update code

This commit is contained in:
Fred Boniface 2023-06-13 13:58:04 +01:00
parent 234915f568
commit 5b53c9f51e
1 changed files with 6 additions and 2 deletions

View File

@ -12,8 +12,10 @@
} }
onMount(async () => { onMount(async () => {
const headcode = await getHeadcode(); const station = await getHeadcode();
document.getElementById('station').textContent = headcode; 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());
}) })
</script> </script>
@ -21,5 +23,7 @@
<Menu {title} /> <Menu {title} />
<p>Station: <span id="station"></span></p> <p>Station: <span id="station"></span></p>
<p id="data_raw"></p>
<Footer {page} /> <Footer {page} />