Skip to content

Commit

Permalink
fix: makeAuthorizationHeader return typing
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Jul 17, 2024
1 parent 458dd71 commit 28bc4a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const buildUrlEncodedData = (obj: object) =>
export const getIsAuthenticated = (idTokenContents: JWTPayload | null | undefined) =>
!!idTokenContents && idTokenContents.exp && Math.round(new Date().getTime() / 1000) < idTokenContents.exp;

export const makeAuthorizationHeader = (token: string | null | undefined): HeadersInit | Record<string, never> =>
export const makeAuthorizationHeader = (token: string | null | undefined): Record<string, string | never> =>
(token ? { Authorization: `Bearer ${token}` } : {});

export const recursiveOrderedObject = (x: Record<string, unknown>): unknown => {
Expand Down

0 comments on commit 28bc4a6

Please sign in to comment.