Add good validation to all existing endpoints

This commit is contained in:
Kevin Puig
2025-09-27 14:17:15 -04:00
parent b9982b626f
commit 27807357ac
3 changed files with 82 additions and 23 deletions

View File

@@ -1,5 +1,13 @@
import { z } from 'zod'
export const queryUserByIdSchema = z.object({
id: z.uuidv7()
})
export const queryAllUsersByInstanceId = z.object({
instanceId: z.uuidv7()
})
export const createUserSchema = z.object({
username: z.string().min(3).max(30),
nickname: z.string().min(1).max(30).optional(),