diff --git a/src/orpc/contracts/todo.ts b/src/orpc/contracts/todo.ts index 69ea79f..b9195a7 100644 --- a/src/orpc/contracts/todo.ts +++ b/src/orpc/contracts/todo.ts @@ -7,11 +7,7 @@ import { import { z } from 'zod' import { todoTable } from '@/db/schema' -const selectSchema = createSelectSchema(todoTable).omit({ - id: true, - createdAt: true, - updatedAt: true, -}) +const selectSchema = createSelectSchema(todoTable) const insertSchema = createInsertSchema(todoTable).omit({ id: true, @@ -19,7 +15,11 @@ const insertSchema = createInsertSchema(todoTable).omit({ updatedAt: true, }) -const updateSchema = createUpdateSchema(todoTable) +const updateSchema = createUpdateSchema(todoTable).omit({ + id: true, + createdAt: true, + updatedAt: true, +}) export const todoContract = { list: oc.input(z.void()).output(z.array(selectSchema)),