From 0e76fb04472a3d4b960034eaee1315c3e82fe64f Mon Sep 17 00:00:00 2001 From: Stanley Horwood Date: Fri, 29 Nov 2024 03:11:14 +0100 Subject: [PATCH] chore(client): correct token location check in `parseRequestToken` Fixed a typo in the `parseRequestToken` function to ensure the correct handling of token placement in the request headers. The condition mistakenly checked for 'headers' instead of 'header', which could lead to incorrect or failed token handling in API requests. This fix aligns with the standard naming convention and ensures the function behaves as intended. --- packages/client/utils/parseRequestToken.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/utils/parseRequestToken.ts b/packages/client/utils/parseRequestToken.ts index 96c82462..02aaf565 100644 --- a/packages/client/utils/parseRequestToken.ts +++ b/packages/client/utils/parseRequestToken.ts @@ -39,7 +39,7 @@ export function parseRequestToken(context: Partial, options: Fet } // --- Append the token to the path parameters. - else if (tokenLocation === 'headers') { + else if (tokenLocation === 'header') { context.init = context.init ?? {} context.init.headers = context.init.headers ?? {} if (tokenProperty) setHeader(context.init.headers, tokenProperty, token)