mirror of
https://github.com/vercel/commerce.git
synced 2025-06-12 19:01:22 +00:00
fix get-logged-in-customer BigCommerce
This commit is contained in:
parent
0661faced9
commit
035334a439
@ -34,7 +34,7 @@ const getLoggedInCustomer: CustomerEndpoint['handlers']['getLoggedInCustomer'] =
|
||||
getLoggedInCustomerQuery,
|
||||
undefined,
|
||||
{
|
||||
'Set-Cookie': `${config.customerCookie}=${token}`,
|
||||
cookie: `${config.customerCookie}=${token}`,
|
||||
}
|
||||
)
|
||||
const { customer } = data
|
||||
|
@ -7,7 +7,7 @@ const fetchGraphqlApi: (getConfig: () => BigcommerceConfig) => GraphQLFetcher =
|
||||
async (
|
||||
query: string,
|
||||
{ variables, preview } = {},
|
||||
options: { headers?: HeadersInit } = {}
|
||||
headers: HeadersInit = {}
|
||||
): Promise<any> => {
|
||||
// log.warn(query)
|
||||
const config = getConfig()
|
||||
@ -16,7 +16,7 @@ const fetchGraphqlApi: (getConfig: () => BigcommerceConfig) => GraphQLFetcher =
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: `Bearer ${config.apiToken}`,
|
||||
...options.headers,
|
||||
...headers,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
|
Loading…
x
Reference in New Issue
Block a user