Fix history: read jobs from data.data.jobs (API wraps in data key)
This commit is contained in:
parent
2105a0052e
commit
373bf88a29
1 changed files with 2 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue