This commit is contained in:
Luiz H. R. Silva 2024-06-28 11:55:31 -03:00
parent 4eb940ef05
commit 61c9609581
5 changed files with 8 additions and 14 deletions

View file

@ -3,7 +3,7 @@ import { z } from "zod"
export const zAmbiente = z.enum(["desenvolvimento", "producao"])
export const PREFIXO = "/pilao-de-dados"
export const PREFIXO_PILAO = "/pilao-de-dados"
export const validarZ = <T>(
zodType: z.ZodType<T, any>,
@ -12,7 +12,6 @@ export const validarZ = <T>(
) => {
const validar = zodType.safeParse(objeto)
if (!validar.success) {
debugger
return respostaComuns.erro(
mensagem,
validar.error.errors.map((e) => `${e.path} ${e.message}`),