Shopify / koa-shopify-auth

DEPRECATED Middleware to authenticate a Koa application with Shopify
MIT License
80 stars 63 forks source link

Wrong Readme documentation code snippet #161

Closed Draccano closed 2 years ago

Draccano commented 2 years ago

Wrong code snippet in Readme

If you look at the https://github.com/Shopify/koa-shopify-auth#example-app , there is code snippet for using shopifyAuth method. However response for webhook is wrong.

Expected behavior

Instead of the

 if (!response.success) {
      console.log(
        `Failed to register APP_UNINSTALLED webhook: ${response.result}`,
     );
  }

There should be

 if (!response['APP_UNINSTALLED'].success) {
      console.log(
        `Failed to register APP_UNINSTALLED webhook: ${response['APP_UNINSTALLED'].result}`
      );
    }