fix: make autorestart field optional in ConfigInfo schema
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 1m10s

The autorestart field is not always present in the Supervisor API
response for getAllConfigInfo(), causing Zod validation errors.

Changed autorestart from required to optional field using .optional().

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-23 23:04:04 +01:00
parent 2d5ffac56c
commit f83ecf864a

View File

@@ -62,7 +62,7 @@ export const ConfigInfoSchema = z.object({
name: z.string(),
group: z.string(),
autostart: z.boolean(),
autorestart: z.string(), // "auto", "none", or "unexpected"
autorestart: z.string().optional(), // "auto", "none", or "unexpected"
directory: z.string(),
command: z.string(),
exitcodes: z.array(z.number()),