mirror of
https://github.com/teamchong/pxpipe.git
synced 2026-07-22 02:02:51 +02:00
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:
+5
-2
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user