Skip to content
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

Merged
merged 35 commits into from
Dec 8, 2023
Merged

December updates #33

merged 35 commits into from
Dec 8, 2023

Conversation

bc-alexsaiannyi
Copy link
Collaborator

@bc-alexsaiannyi bc-alexsaiannyi commented Dec 7, 2023

This PR brings fresh updates from Vercel, including Next.js 14.

Copy link

vercel bot commented Dec 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextjs-commerce ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 8, 2023 11:33am

BrocksiNet and others added 21 commits December 7, 2023 13:52
…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>
Comment on lines 53 to 72
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;
};
Copy link
Collaborator

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?

Copy link
Collaborator Author

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!

Copy link
Collaborator

@BC-krasnoshapka BC-krasnoshapka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bc-alexsaiannyi bc-alexsaiannyi merged commit 5936cd5 into main Dec 8, 2023
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip work in progress PRs, not ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.