From 40719094aae5c62d02979d1fa30a89fa53f8e329 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Tue, 14 Nov 2023 22:02:51 +0800 Subject: [PATCH] refactor: add interval limit for monitor upsert --- src/server/trpc/routers/monitor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/trpc/routers/monitor.ts b/src/server/trpc/routers/monitor.ts index d976bbc..7db03f0 100644 --- a/src/server/trpc/routers/monitor.ts +++ b/src/server/trpc/routers/monitor.ts @@ -88,7 +88,7 @@ export const monitorRouter = router({ name: z.string(), type: z.string(), 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([]), payload: z.object({}).passthrough(), })