fix: allow null avatarUrl in updateProfileSchema
All checks were successful
CI / ci (push) Successful in 1m13s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 15s

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) <noreply@anthropic.com>
This commit is contained in:
2026-04-12 21:24:11 +02:00
parent a0c01d388c
commit d749e41f7b

View File

@@ -136,7 +136,7 @@ export const bulkUpsertGlobalItemsSchema = z.object({
// Profile schemas // Profile schemas
export const updateProfileSchema = z.object({ export const updateProfileSchema = z.object({
displayName: z.string().max(100).optional(), displayName: z.string().max(100).optional(),
avatarUrl: z.string().optional(), avatarUrl: z.string().nullable().optional(),
bio: z.string().max(500).optional(), bio: z.string().max(500).optional(),
}); });