Skip to content

Commit a0761e9

Browse files
committed
refactor: pass single obj to serializeCookie
1 parent 2907555 commit a0761e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils/cookie.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { CookieSerializeOptions } from "cookie-es";
22
import type { H3Event, HTTPEvent } from "../event.ts";
3-
import { parse as parseCookie, serialize as serializeCookie, parseSetCookie } from "cookie-es";
3+
import { parseCookie, serializeCookie, parseSetCookie } from "cookie-es";
44
import { validateData } from "./internal/validate.ts";
55
import type { StandardSchemaV1, FailureResult, InferOutput } from "./internal/standard-schema.ts";
66
import type { ValidateResult, OnValidateError } from "./internal/validate.ts";
@@ -85,7 +85,7 @@ export function setCookie(
8585
options?: CookieSerializeOptions,
8686
): void {
8787
// Serialize cookie
88-
const newCookie = serializeCookie(name, value, { path: "/", ...options });
88+
const newCookie = serializeCookie({ name, value, path: "/", ...options });
8989

9090
// Check and add only not any other set-cookie headers already set
9191
const currentCookies = event.res.headers.getSetCookie();

0 commit comments

Comments
 (0)