diff --git a/client/src/components/Seismic.vue b/client/src/components/Seismic.vue index 1bdd514..85be28c 100644 --- a/client/src/components/Seismic.vue +++ b/client/src/components/Seismic.vue @@ -41,7 +41,7 @@ async function poll() { if(history.value.length > MAX_PTS) history.value.shift(); } -onMounted(async () => { await poll(); interval = setInterval(poll, 5000); }); +onMounted(async () => { await poll(); interval = setInterval(poll, 1000); }); onUnmounted(() => clearInterval(interval)); diff --git a/server/src/server.mjs b/server/src/server.mjs index c700de4..e1fec7d 100644 --- a/server/src/server.mjs +++ b/server/src/server.mjs @@ -124,11 +124,11 @@ app.get('/api/position', asyncHandler(async (req, res) => { // ── Icon ────────────────────────────────────────────────────────────────────── -app.get('/api/icon/:icon', asyncHandler(async (req, res) => { +app.get('/api/icon/:icon', asyncHandler(async (req, res, next) => { const { icon } = req.params; if(!icon) return next(); // 404 fallback can handle missing icons - resp.contentType('image/png'); - resp.sendFile(await fetchIcon(icon)); + res.contentType('image/png'); + res.sendFile(await fetchIcon(icon)); })); // ── Space ─────────────────────────────────────────────────────────────────────