diff --git a/.changeset/metal-needles-share.md b/.changeset/metal-needles-share.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/metal-needles-share.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/docs/guides/webhooks.md b/docs/guides/webhooks.md index 6bfa4e577..dc352d984 100644 --- a/docs/guides/webhooks.md +++ b/docs/guides/webhooks.md @@ -71,7 +71,7 @@ app.post('/webhooks', express.text({type: '*/*'}), async (req, res) => { console.log(`Received webhook for ${topic} for shop ${domain}`); - const sessionId = shopify.session.getOfflineId({shop: domain}); + const sessionId = shopify.session.getOfflineId(domain); // Run your webhook-processing code here! }); @@ -87,7 +87,7 @@ const handleWebhookRequest = async ( webhookId: string, apiVersion: string, ) => { - const sessionId = shopify.session.getOfflineId({shop}); + const sessionId = shopify.session.getOfflineId(shop); // Run your webhook-processing code here! }; diff --git a/docs/reference/session/getOfflineId.md b/docs/reference/session/getOfflineId.md index 5fb789613..5ec06b6d7 100644 --- a/docs/reference/session/getOfflineId.md +++ b/docs/reference/session/getOfflineId.md @@ -9,7 +9,7 @@ You should **_never_** read the shop from user inputs or URLs. ```ts async function myWebhookHandler(topic, shop) { - const offlineSessionId = await shopify.session.getOfflineId({shop}); + const offlineSessionId = await shopify.session.getOfflineId(shop); // use sessionId to retrieve session from app's session storage // getSessionFromStorage() must be provided by application diff --git a/docs/reference/webhooks/addHandlers.md b/docs/reference/webhooks/addHandlers.md index f67353769..2c288c1b5 100644 --- a/docs/reference/webhooks/addHandlers.md +++ b/docs/reference/webhooks/addHandlers.md @@ -21,7 +21,7 @@ const handleWebhookRequest = async ( webhookId: string, apiVersion: string, ) => { - const sessionId = shopify.session.getOfflineId({shop}); + const sessionId = shopify.session.getOfflineId(shop); // Fetch the session from storage and process the webhook event };