Updated zod to v4
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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(),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user