fix(backup): added limits in zod schema

This commit is contained in:
DerPenz 2026-04-10 14:33:22 +02:00 committed by Nico
parent b2728cb09a
commit 61396625f1

View file

@ -130,8 +130,8 @@ export const createBackupScheduleBody = z.object({
oneFileSystem: z.boolean().optional(),
tags: z.array(z.string()).optional(),
customResticParams: z.array(z.string()).optional(),
maxRetries: z.number().optional(),
retryDelay: z.number().optional(),
maxRetries: z.number().min(0).max(32).optional(),
retryDelay: z.number().min(1).max(1440).optional(),
});
export type CreateBackupScheduleBody = z.infer<typeof createBackupScheduleBody>;
@ -169,8 +169,8 @@ export const updateBackupScheduleBody = z.object({
oneFileSystem: z.boolean().optional(),
tags: z.array(z.string()).optional(),
customResticParams: z.array(z.string()).optional(),
maxRetries: z.number().optional(),
retryDelay: z.number().optional(),
maxRetries: z.number().min(0).max(32).optional(),
retryDelay: z.number().min(1).max(1440).optional(),
});
export type UpdateBackupScheduleBody = z.infer<typeof updateBackupScheduleBody>;