Add debug logging for goals data

This commit is contained in:
Yuyao Huang 2026-05-09 14:26:57 +08:00
parent 1f4efcd7b3
commit 295fde8a75

View File

@ -10,6 +10,7 @@ let isInitializing = false;
async function loadGoals() { async function loadGoals() {
try { try {
goals = await get("/api/goals"); goals = await get("/api/goals");
console.log("loadGoals: goals =", goals.map(g => ({id: g.id, selected_task_id: g.selected_task_id})));
currentUser = await get("/api/auth/me"); currentUser = await get("/api/auth/me");
const selector = document.getElementById("goal-selector"); const selector = document.getElementById("goal-selector");
const activatedGoals = goals.filter(g => g.activated); const activatedGoals = goals.filter(g => g.activated);