-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
December updates #33
December updates #33
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…ercel#1172) * Adds better error messages and environment variable fault tolerance * No hidden undefined
* Adds environment variable validation * Adds bracket checking in SHOPIFY_STORE_DOMAIN * Prettier * Adds link --------- Co-authored-by: Lee Robinson <lrobinson2011@gmail.com>
74e1d91
to
01f2755
Compare
cd86991
to
4612842
Compare
4612842
to
1bd4045
Compare
lib/bigcommerce/storefront-config.ts
Outdated
export const fetchStorefrontToken = async () => { | ||
const response = await fetch( | ||
`${BIGCOMMERCE_API_URL}/stores/${process.env.BIGCOMMERCE_STORE_HASH}/v3/storefront/api-token-customer-impersonation`, | ||
{ | ||
method: 'POST', | ||
headers: { | ||
accept: 'application/json', | ||
'content-type': 'application/json', | ||
'x-auth-token': process.env.BIGCOMMERCE_ACCESS_TOKEN!, | ||
'x-bc-customer-id': '' | ||
}, | ||
body: JSON.stringify({ | ||
channel_id: parseInt(process.env.BIGCOMMERCE_CHANNEL_ID!), | ||
expires_at: Math.floor(new Date().getTime() / 1000) + 1 * 24 * 60 * 60 // 1 day | ||
}) | ||
} | ||
); | ||
|
||
return (await response.json()) as StorefrontTokenResponse; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bc-alexsaiannyi I don't see where this function is used. Do you know why it was introduced here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like it's been a incorrect result of resolving conflicts. Thanks for catching this!
1bd4045
to
4ad3771
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR brings fresh updates from Vercel, including Next.js 14.