Fixed icon
This commit is contained in:
@@ -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));
|
||||
</script>
|
||||
|
||||
|
||||
@@ -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 ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user