feat: add assigneeId/assigneeName to tasks schema and API
- Added assignee_id and assignee_name columns to tasks table - PATCH /api/tasks/:id now accepts assigneeId and assigneeName - db:push on startup will auto-migrate the columns
This commit is contained in:
@@ -231,6 +231,8 @@ export const taskRoutes = new Elysia({ prefix: "/api/tasks" })
|
||||
}
|
||||
if (body.priority !== undefined) updates.priority = body.priority;
|
||||
if (body.position !== undefined) updates.position = body.position;
|
||||
if (body.assigneeId !== undefined) updates.assigneeId = body.assigneeId;
|
||||
if (body.assigneeName !== undefined) updates.assigneeName = body.assigneeName;
|
||||
|
||||
const updated = await db
|
||||
.update(tasks)
|
||||
@@ -255,6 +257,8 @@ export const taskRoutes = new Elysia({ prefix: "/api/tasks" })
|
||||
status: t.Optional(t.String()),
|
||||
priority: t.Optional(t.String()),
|
||||
position: t.Optional(t.Number()),
|
||||
assigneeId: t.Optional(t.Union([t.String(), t.Null()])),
|
||||
assigneeName: t.Optional(t.Union([t.String(), t.Null()])),
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user