From da339a767b56571e0eb191c19d5fb3b1d2a54aa0 Mon Sep 17 00:00:00 2001 From: Esdras Renan Date: Tue, 14 Oct 2025 21:37:09 -0300 Subject: [PATCH] Fix type: use third param type for cookies.set options --- src/app/api/machines/sessions/route.ts | 2 +- src/app/machines/handshake/route.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/machines/sessions/route.ts b/src/app/api/machines/sessions/route.ts index 3bb793e..3dfe5ac 100644 --- a/src/app/api/machines/sessions/route.ts +++ b/src/app/api/machines/sessions/route.ts @@ -81,7 +81,7 @@ export async function POST(request: Request) { const rec = toPairs(raw) const name = String(rec.name) const value = String(rec.value) - const options: Parameters[1] = { + const options: Parameters[2] = { httpOnly: Boolean(rec["httponly"]) || /httponly/i.test(raw), secure: /;\s*secure/i.test(raw), path: typeof rec["path"] === "string" ? (rec["path"] as string) : "/", diff --git a/src/app/machines/handshake/route.ts b/src/app/machines/handshake/route.ts index 4f103f2..cb779d9 100644 --- a/src/app/machines/handshake/route.ts +++ b/src/app/machines/handshake/route.ts @@ -87,7 +87,7 @@ export async function GET(request: NextRequest) { const rec = toPairs(raw) const name = String(rec.name) const value = String(rec.value) - const options: Parameters[1] = { + const options: Parameters[2] = { httpOnly: Boolean(rec["httponly"]) || /httponly/i.test(raw), secure: /;\s*secure/i.test(raw), path: typeof rec["path"] === "string" ? (rec["path"] as string) : "/",