refactor: add interval limit for monitor upsert

This commit is contained in:
moonrailgun 2023-11-14 22:02:51 +08:00
parent eed6f33d7b
commit 40719094aa

View File

@ -88,7 +88,7 @@ export const monitorRouter = router({
name: z.string(), name: z.string(),
type: z.string(), type: z.string(),
active: z.boolean().default(true), active: z.boolean().default(true),
interval: z.number().int().default(20), interval: z.number().int().min(5).max(10000).default(20),
notificationIds: z.array(z.string()).default([]), notificationIds: z.array(z.string()).default([]),
payload: z.object({}).passthrough(), payload: z.object({}).passthrough(),
}) })