fix(dashboard): parse ?id=N on /proxy-latest-png

Router was calling dashboard.servePng() with no argument, so every per-id
thumbnail URL fell back to 'latest image' and all N thumbs on a row
rendered the same PNG. Forward the parsed id from the query string.
This commit is contained in:
teamchong
2026-05-27 08:13:06 -04:00
parent 2f78ecaf9f
commit 175d2bbb4d
+5 -2
View File
@@ -189,9 +189,12 @@ async function dispatchDashboard(
case 'recent':
if (method !== 'GET') return undefined;
return dashboard.serveRecent();
case 'png':
case 'png': {
if (method !== 'GET') return undefined;
return dashboard.servePng();
const idRaw = url.searchParams.get('id');
const idNum = idRaw != null ? Number(idRaw) : NaN;
return dashboard.servePng(Number.isFinite(idNum) ? idNum : undefined);
}
case 'api-sessions': {
if (method !== 'GET') return undefined;
return dashboard.serveSessionsJson({