feat(schedule): 조회 응답에 datePrecision 포함
목록(SCHEDULE_LIST_SQL)·상세(getScheduleDetail) 쿼리/포맷터가 date_precision을 반환하도록 추가. 기본값 'day'. 공개 페이지에서 'month'인 일정을 날짜 미정으로 렌더링하기 위한 읽기 지원. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
17746581e1
commit
44d30d48f6
1 changed files with 3 additions and 0 deletions
|
|
@ -86,6 +86,7 @@ export function formatSchedule(rawSchedule, members = []) {
|
|||
id: rawSchedule.id,
|
||||
title: rawSchedule.title,
|
||||
date: normalizeDate(rawSchedule.date),
|
||||
datePrecision: rawSchedule.date_precision || 'day',
|
||||
time: rawSchedule.time || null,
|
||||
category: {
|
||||
id: rawSchedule.category_id,
|
||||
|
|
@ -268,6 +269,7 @@ export async function getScheduleDetail(db, id, getXProfile = null) {
|
|||
id: s.id,
|
||||
title: s.title,
|
||||
date: normalizeDate(s.date),
|
||||
datePrecision: s.date_precision || 'day',
|
||||
time: s.time || null,
|
||||
category: {
|
||||
id: s.category_id,
|
||||
|
|
@ -470,6 +472,7 @@ const SCHEDULE_LIST_SQL = `
|
|||
s.id,
|
||||
s.title,
|
||||
s.date,
|
||||
s.date_precision,
|
||||
s.time,
|
||||
s.category_id,
|
||||
c.name as category_name,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue