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); } /**