diff --git a/src/api/plugins/validate.ts b/src/api/plugins/validate.ts index ca3c0ba..cf948b7 100644 --- a/src/api/plugins/validate.ts +++ b/src/api/plugins/validate.ts @@ -16,7 +16,7 @@ const zodValidationPlugin: FastifyPluginAsync = async (fastify, _options) => { zodSchema: z.ZodTypeAny, ): Promise { try { - await zodSchema.parseAsync(request.body); + await zodSchema.parseAsync(request.body || {}); } catch (e: unknown) { if (e instanceof ZodError) { throw new ValidationError({