From 4c4c9accae1d4cffbdb7622acde196d33c7928b6 Mon Sep 17 00:00:00 2001 From: richardtekula Date: Thu, 22 Jan 2026 11:40:48 +0100 Subject: [PATCH] fix: Add pricingTiers to service Zod validators - pricingTiers field was missing from createServiceSchema - pricingTiers field was missing from updateServiceSchema - This caused the field to be stripped during validation Co-Authored-By: Claude Opus 4.5 --- src/validators/crm.validators.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/validators/crm.validators.js b/src/validators/crm.validators.js index a51f76a..3475429 100644 --- a/src/validators/crm.validators.js +++ b/src/validators/crm.validators.js @@ -205,11 +205,13 @@ export const createServiceSchema = z.object({ required_error: 'Cena je povinná', }) .min(1, 'Cena nemôže byť prázdna'), + pricingTiers: z.string().optional().or(z.literal('').or(z.null())), description: z.string().max(1000).optional(), }); export const updateServiceSchema = z.object({ name: z.string().min(1).max(255).optional(), price: z.string().min(1).optional(), + pricingTiers: z.string().optional().or(z.literal('').or(z.null())), description: z.string().max(1000).optional().or(z.literal('').or(z.null())), });