Added category schema validation

This commit is contained in:
Alexis
2024-06-10 20:43:05 +02:00
parent a1aa512018
commit 69f18e9338
4 changed files with 11 additions and 6 deletions

View File

@@ -1,4 +1,11 @@
import { z } from 'zod'
export interface Category {
id: number
name: string
}
export const categorySchema = z.object({
id: z.number().int(),
name: z.string()
})