From 46342883b7cf47597dfd574277db6d6b6e880c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Zori=C4=87?= Date: Mon, 16 Dec 2024 14:43:19 +0100 Subject: [PATCH] fix(api-admin-users): optional avatar on user create --- .../api-admin-users/src/createAdminUsers/users.validation.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/api-admin-users/src/createAdminUsers/users.validation.ts b/packages/api-admin-users/src/createAdminUsers/users.validation.ts index ae30ee4cd6..c2923db90d 100644 --- a/packages/api-admin-users/src/createAdminUsers/users.validation.ts +++ b/packages/api-admin-users/src/createAdminUsers/users.validation.ts @@ -13,7 +13,7 @@ const createUserDataValidation = zod.object({ email: zod.string(), firstName: zod.string().min(1).optional(), lastName: zod.string().min(1).optional(), - avatar: zod.object({}).passthrough() + avatar: zod.object({}).passthrough().optional() }); const updateUserDataValidation = zod.object({ @@ -34,6 +34,7 @@ export const attachUserValidation = ( if (validation.success) { return; } + console.log(JSON.stringify(validation.error, null, 2)); throw createZodError(validation.error); });