From 5325d30aa77abac26e55c8930adb1e45aff94baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 20 Feb 2025 15:37:16 +0000 Subject: [PATCH] Rename endpoint param --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 9768499..60e01b3 100644 --- a/src/index.js +++ b/src/index.js @@ -35,7 +35,7 @@ const defaultContext = { const screenshotSchema = z.object({ url: z.string().url(), - color: z.enum(["light", "dark"]).default("light"), + theme: z.enum(["light", "dark"]).default("light"), headers: z.record(z.string(), z.any()), }); router.post( @@ -44,7 +44,7 @@ router.post( const body = await readValidatedBody(event, screenshotSchema.parse); const context = await browser.newContext({ ...defaultContext, - colorScheme: body.color, + colorScheme: body.theme, extraHTTPHeaders: body.headers, }); const page = await context.newPage();