fix: make ReloadConfigResult fields optional with default empty arrays
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 1m33s
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 1m33s
The Supervisor API doesn't always return 'changed' and 'removed' arrays when reloading configuration, causing Zod validation errors. Made all three fields (added, changed, removed) optional with default empty arrays to handle cases where the API omits them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -92,9 +92,9 @@ export const ConfigInfoSchema = z.object({
|
||||
});
|
||||
|
||||
export const ReloadConfigResultSchema = z.object({
|
||||
added: z.array(z.array(z.string())),
|
||||
changed: z.array(z.array(z.string())),
|
||||
removed: z.array(z.array(z.string())),
|
||||
added: z.array(z.array(z.string())).optional().default([]),
|
||||
changed: z.array(z.array(z.string())).optional().default([]),
|
||||
removed: z.array(z.array(z.string())).optional().default([]),
|
||||
});
|
||||
|
||||
// TypeScript Types
|
||||
|
||||
Reference in New Issue
Block a user