From 2ded5c85177128613b8cf33e7b1aae2c550b0d4f Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 19 Dec 2024 16:47:50 -0600 Subject: [PATCH] Fix schema key type --- src/pages/api/revalidate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/api/revalidate.ts b/src/pages/api/revalidate.ts index 50e8708..7c2d267 100644 --- a/src/pages/api/revalidate.ts +++ b/src/pages/api/revalidate.ts @@ -6,7 +6,7 @@ import { env } from "../../env/server.mjs"; async function getURLs( type: string, - key: string, + key: string | number, payload: Map, ): Promise { if (type == "project_link" || type == "project_technology") { @@ -49,7 +49,7 @@ async function getURLs( const requestSchema = z.object({ type: z.string(), - keys: z.array(z.string()).min(1), + keys: z.array(z.string().or(z.number().int())).min(1), source: z.map(z.string(), z.any()), payload: z.map(z.string(), z.any()), });