Skip to content

Commit

Permalink
Fix function name and error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Jul 12, 2023
1 parent 677632e commit 6922584
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/middlewares/cookie-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type BindingsObject<Secret extends string> = {
[K in Secret]: string;
};

export function kvSession<
export function cookieSession<
SecretBinding extends string,
Data = SessionData,
FlashData = Data,
Expand All @@ -39,7 +39,9 @@ export function kvSession<
let secrets = options.cookie.secrets(context);

if (secrets.length === 0) {
throw new ReferenceError("The secrets for the kvSession are not set.");
throw new ReferenceError(
"The secrets for the cookieSession are not set.",
);
}

return createCookieSessionStorage<Data, FlashData>({
Expand Down

0 comments on commit 6922584

Please sign in to comment.