We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 11db64c + 5325d30 commit cd14870Copy full SHA for cd14870
src/index.js
@@ -35,7 +35,7 @@ const defaultContext = {
35
36
const screenshotSchema = z.object({
37
url: z.string().url(),
38
- color: z.enum(["light", "dark"]).default("light"),
+ theme: z.enum(["light", "dark"]).default("light"),
39
headers: z.record(z.string(), z.any()),
40
});
41
router.post(
@@ -44,7 +44,7 @@ router.post(
44
const body = await readValidatedBody(event, screenshotSchema.parse);
45
const context = await browser.newContext({
46
...defaultContext,
47
- colorScheme: body.color,
+ colorScheme: body.theme,
48
extraHTTPHeaders: body.headers,
49
50
const page = await context.newPage();
0 commit comments