@shopify/koa-shopify-webhooks
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -10,2 +10,6 @@ # Changelog | ||
## [1.1.4] - 2019-03-29 | ||
- Check success via valid webhookSubscription field | ||
## [1.1.3] - 2019-03-22 | ||
@@ -12,0 +16,0 @@ |
@@ -10,3 +10,3 @@ import { Topic } from './types'; | ||
success: boolean; | ||
data: any; | ||
result: any; | ||
}>; |
@@ -9,3 +9,3 @@ "use strict"; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var _b, response, data; | ||
var _b, response, result; | ||
return tslib_1.__generator(this, function (_c) { | ||
@@ -25,9 +25,10 @@ switch (_c.label) { | ||
case 2: | ||
data = _c.sent(); | ||
if (response.status === network_1.StatusCode.Created || | ||
response.status === network_1.StatusCode.Ok) { | ||
return [2 /*return*/, { success: true, data: data }]; | ||
result = _c.sent(); | ||
if (result.data && | ||
result.data.webhookSubscriptionCreate && | ||
result.data.webhookSubscriptionCreate.webhookSubscription) { | ||
return [2 /*return*/, { success: true, result: result }]; | ||
} | ||
else { | ||
return [2 /*return*/, { success: false, data: data }]; | ||
return [2 /*return*/, { success: false, result: result }]; | ||
} | ||
@@ -34,0 +35,0 @@ return [2 /*return*/]; |
{ | ||
"name": "@shopify/koa-shopify-webhooks", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Receive webhooks from Shopify with ease.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14242
148