From d660340cc5e6f4fda0095ab599d8c034f1d3b1db Mon Sep 17 00:00:00 2001 From: caadiq Date: Wed, 21 Jan 2026 20:24:51 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20getUpcomingSchedules=EC=97=90?= =?UTF-8?q?=20flattenScheduleResponse=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 백엔드 응답(날짜별 그룹 객체)을 배열로 변환 - 필드명 snake_case 통일 (category_id, category_name, category_color) Co-Authored-By: Claude Opus 4.5 --- frontend-temp/src/api/schedules.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend-temp/src/api/schedules.js b/frontend-temp/src/api/schedules.js index 144c82d..cae1b68 100644 --- a/frontend-temp/src/api/schedules.js +++ b/frontend-temp/src/api/schedules.js @@ -16,9 +16,9 @@ function flattenScheduleResponse(data) { schedules.push({ ...schedule, date, - categoryId: category.id, - categoryName: category.name, - categoryColor: category.color, + category_id: category.id, + category_name: category.name, + category_color: category.color, }); } } @@ -40,7 +40,8 @@ export async function getSchedules(year, month) { */ export async function getUpcomingSchedules(limit = 3) { const today = getTodayKST(); - return fetchApi(`/schedules?startDate=${today}&limit=${limit}`); + const data = await fetchApi(`/schedules?startDate=${today}&limit=${limit}`); + return flattenScheduleResponse(data); } /**