diff --git a/src/routes/todo.tsx b/src/routes/todo.tsx index 69cc967..468661f 100644 --- a/src/routes/todo.tsx +++ b/src/routes/todo.tsx @@ -8,18 +8,17 @@ import { z } from 'zod' import { db } from '@/db' import { todoTable } from '@/db/schema' -// Zod Schemas const createTodoSchema = z.object({ title: z.string().min(1, '标题不能为空'), }) const updateTodoSchema = z.object({ - id: z.string().uuid(), + id: z.uuid(), completed: z.boolean(), }) const deleteTodoSchema = z.object({ - id: z.string().uuid(), + id: z.uuid(), }) // Server Functions - CRUD 操作