From 15c2b736aec71484852b096f9ec5c48081552645 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Fri, 22 Sep 2023 16:56:03 -0400 Subject: [PATCH] fix(striker-ui-api): record only latest ss in fetch server screenshot --- .../src/lib/request_handlers/server/getServerDetail.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/striker-ui-api/src/lib/request_handlers/server/getServerDetail.ts b/striker-ui-api/src/lib/request_handlers/server/getServerDetail.ts index 38b9b180..c0f5e069 100644 --- a/striker-ui-api/src/lib/request_handlers/server/getServerDetail.ts +++ b/striker-ui-api/src/lib/request_handlers/server/getServerDetail.ts @@ -90,10 +90,10 @@ export const getServerDetail: RequestHandler< return a.timestamp > b.timestamp ? 1 : -1; }); - stdoutVar(ssMetas, `Server screenshots: `); - const ssMetaLatest = ssMetas.pop(); + stdoutVar(ssMetaLatest, `Latest server screenshot: `); + if (ssMetaLatest) { const { name } = ssMetaLatest;