diff --git a/server.js b/server.js index 3129a2b..66adf76 100644 --- a/server.js +++ b/server.js @@ -775,7 +775,14 @@ app.get("/api/ampp/jobs", requireAuth, async (req, res) => { return res.json({ success: true, jobs: await r2.json() }); } if (!r.ok) return res.status(r.status).json({ success: false, error: `AMPP ${r.status}` }); - res.json({ success: true, jobs: await r.json() }); + const jobData = await r.json(); + // Debug: log the first job's full structure to identify field names + const items = Array.isArray(jobData) ? jobData : (jobData?.items || jobData?.results || []); + if (items.length > 0) { + console.log("[AMPP] Sample job keys:", Object.keys(items[0])); + console.log("[AMPP] Sample job data:", JSON.stringify(items[0]).substring(0, 1000)); + } + res.json({ success: true, jobs: jobData }); } catch (err) { if (err.name === "AbortError") return res.status(504).json({ success: false, error: "AMPP timeout" }); res.status(500).json({ success: false, error: err.message });