Updated zod to v4

This commit is contained in:
Alexis
2025-07-26 23:18:09 +02:00
parent b0975ee293
commit 1d74d6f64b
18 changed files with 162 additions and 93 deletions

View File

@@ -3,7 +3,7 @@ import { serverSupabaseClient } from "#supabase/server"
import type { World } from "~/models/World"
const paramsSchema = z.object({
id: z.number({ coerce: true }).positive().int()
id: z.coerce.number().positive().int()
})
export default defineEventHandler(async (event) => {

View File

@@ -3,7 +3,7 @@ import { serverSupabaseClient } from "#supabase/server"
import { postWorldSchema, type World } from "~/models/World"
const paramsSchema = z.object({
id: z.number({ coerce: true }).positive().int()
id: z.coerce.number().positive().int()
})
export default defineEventHandler(async (event) => {

View File

@@ -3,8 +3,8 @@ import { serverSupabaseClient } from "#supabase/server";
import type { World } from "~/models/World";
const querySchema = z.object({
id: z.number({ coerce: true }).positive().int().optional(),
full: z.boolean({ coerce: true }).optional(),
id: z.coerce.number().positive().int().optional(),
full: z.coerce.boolean().optional(),
gmId: z.string().optional(),
})