Added category schema validation
This commit is contained in:
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user