From 373bf88a29fc96f32c0aca727f7de3fe61d9abb2 Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Fri, 13 Mar 2026 15:18:20 +0000 Subject: [PATCH] Fix history: read jobs from data.data.jobs (API wraps in data key) --- js/app.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/js/app.js b/js/app.js index 539adc6..be2a784 100644 --- a/js/app.js +++ b/js/app.js @@ -111,13 +111,8 @@ async function loadHistory() { try { const data = await apiCall('list'); - console.log('[history] api response:', data); - if (data && data.jobs) { - renderHistory(data.jobs); - } else { - console.warn('[history] unexpected response format:', data); - renderHistory([]); - } + const jobs = data?.data?.jobs || data?.jobs || []; + renderHistory(jobs); } catch (e) { console.error('[history] failed to load:', e); }