From d749e41f7b0629bd8b5c4afb0846fe5342a12181 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sun, 12 Apr 2026 21:24:11 +0200 Subject: [PATCH] fix: allow null avatarUrl in updateProfileSchema The Zod schema rejected null for avatarUrl, but the client sends null when the avatar is removed. Changed to z.string().nullable().optional(). Co-Authored-By: Claude Opus 4.6 (1M context) --- src/shared/schemas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/schemas.ts b/src/shared/schemas.ts index 22c61e0..b0108d2 100644 --- a/src/shared/schemas.ts +++ b/src/shared/schemas.ts @@ -136,7 +136,7 @@ export const bulkUpsertGlobalItemsSchema = z.object({ // Profile schemas export const updateProfileSchema = z.object({ displayName: z.string().max(100).optional(), - avatarUrl: z.string().optional(), + avatarUrl: z.string().nullable().optional(), bio: z.string().max(500).optional(), });