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

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:
2025-11-24 05:32:58 +01:00
parent 7f1c110f8f
commit 813f6d4c75

View File

@@ -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