Skip to content

Commit

Permalink
narrow params type for getSession
Browse files Browse the repository at this point in the history
  • Loading branch information
Huliiiiii committed Jul 18, 2024
1 parent d06fcfc commit ad0d0ca
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/auth-solid-start/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,13 +739,12 @@ export class SolidServerAuth extends SolidAuthHelpers {

getSession = ({
event,
tokenData,
token,
}: {
event?: HTTPEvent;
tokenData?: TokenData;
} = {}) => {
} & { token?: string } = {}) => {
const authToken =
tokenData?.auth_token ??
token ??
(event
? getCookie(event, this.options.authCookieName)
: getCookie(this.options.authCookieName)) ??
Expand Down

0 comments on commit ad0d0ca

Please sign in to comment.