From db93157633d9055ac62111b34a54a6153ab56476 Mon Sep 17 00:00:00 2001 From: EENE Dashboard Date: Mon, 1 Jun 2026 15:02:22 +0900 Subject: [PATCH] fix: add showDate to backend POST/PATCH handlers Co-authored-by: Cursor --- backend/src/routes/tasks.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/routes/tasks.ts b/backend/src/routes/tasks.ts index f188397..18abd35 100644 --- a/backend/src/routes/tasks.ts +++ b/backend/src/routes/tasks.ts @@ -56,7 +56,7 @@ router.get('/:id', async (req, res, next) => { router.post('/', async (req, res, next) => { try { const { title, description, status, priority, quarter, category, - section, tag, taskType, progress, issueNote, startDate, dueDate, assigneeId } = + section, tag, taskType, progress, issueNote, startDate, dueDate, assigneeId, showDate } = req.body as Record; if (!title || !quarter) { @@ -78,6 +78,7 @@ router.post('/', async (req, res, next) => { issueNote: issueNote || null, startDate: startDate ? new Date(startDate) : undefined, dueDate: dueDate ? new Date(dueDate) : undefined, + showDate: showDate !== undefined ? showDate === 'true' || showDate === true : true, assigneeId: assigneeId || null, creatorId: (req.body as Record).creatorId ?? 'system', }, @@ -96,8 +97,8 @@ router.patch('/:id', async (req, res, next) => { if (!existing) throw new AppError(404, '업무를 찾을 수 없습니다.'); const { title, description, status, priority, quarter, category, - section, tag, taskType, progress, issueNote, startDate, dueDate, assigneeId } = - req.body as Record; + section, tag, taskType, progress, issueNote, startDate, dueDate, assigneeId, showDate } = + req.body as Record; const task = await prisma.task.update({ where: { id: req.params.id }, @@ -116,6 +117,7 @@ router.patch('/:id', async (req, res, next) => { ...(startDate !== undefined && { startDate: startDate ? new Date(startDate) : null }), ...(dueDate !== undefined && { dueDate: dueDate ? new Date(dueDate) : null }), ...(assigneeId !== undefined && { assigneeId: assigneeId || null }), + ...(showDate !== undefined && { showDate: showDate === true || showDate === 'true' }), }, });