@ns8/ns8-shopify-switches
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -5,3 +5,3 @@ "use strict"; | ||
create(order) { | ||
console.log('creating shopify order'); | ||
console.log('creating shopify order', order); | ||
return order; | ||
@@ -8,0 +8,0 @@ } |
@@ -7,10 +7,8 @@ "use strict"; | ||
this.onInstall = async (data) => { | ||
console.log('shopify install webhooks'); | ||
const { shopName, accessToken } = data; | ||
console.log('shopName', shopName); | ||
console.log('accessToken', accessToken); | ||
console.log('shopify install webhooks', data); | ||
const { shopName, accessToken } = data.platformData; | ||
const client = new Shopify({ shopName, accessToken }); | ||
const response = await client.webhook.create({ | ||
topic: 'orders/create', | ||
address: 'https://carl-local-shopify-protect.ngrok.io/executor?action=createOrder', | ||
address: data.webhooks.createOrder, | ||
}); | ||
@@ -17,0 +15,0 @@ return response; |
{ | ||
"name": "@ns8/ns8-shopify-switches", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Custom switches for the shopify integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3127
34