Skip to content

Commit

Permalink
fix(api-admin-users): optional avatar on user create
Browse files Browse the repository at this point in the history
  • Loading branch information
brunozoric committed Dec 16, 2024
1 parent 4dddcea commit 4634288
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -34,6 +34,7 @@ export const attachUserValidation = (
if (validation.success) {
return;
}
console.log(JSON.stringify(validation.error, null, 2));
throw createZodError(validation.error);
});

Expand Down

0 comments on commit 4634288

Please sign in to comment.