From 8f8fb86fa44b4f6129816606a44968984e079fc8 Mon Sep 17 00:00:00 2001 From: Phillip Malboeuf Date: Tue, 4 Sep 2018 08:55:18 -0400 Subject: [PATCH 1/5] Remove extra comma Causes problems with deployment to AWS beanstalk and Google cloud functions --- routes/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/index.js b/routes/index.js index 3bde606..d30b829 100644 --- a/routes/index.js +++ b/routes/index.js @@ -15,7 +15,7 @@ module.exports = function createRouter(shopifyConfig) { '/api', rawParser, verifyApiCall, - shopifyApiProxy, + shopifyApiProxy ); return router; From 005b185c6470353d384c7b3371fdf86d324f3aee Mon Sep 17 00:00:00 2001 From: Phillip Malboeuf Date: Tue, 4 Sep 2018 09:31:30 -0400 Subject: [PATCH 2/5] No extra commas --- routes/shopifyAuth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/shopifyAuth.js b/routes/shopifyAuth.js index 2d3ada1..0280a69 100644 --- a/routes/shopifyAuth.js +++ b/routes/shopifyAuth.js @@ -9,7 +9,7 @@ module.exports = function createShopifyAuthRoutes({ scope, afterAuth, shopStore, - accessMode, + accessMode }) { return { // This function initializes the Shopify OAuth Process @@ -42,7 +42,7 @@ module.exports = function createShopifyAuthRoutes({ window.top.location.href = "${redirectTo}?${querystring.stringify(redirectParams)}" - `, + ` ); }, From 31efef665f021e99a8e86b55784c357f023e3ad2 Mon Sep 17 00:00:00 2001 From: Phillip Malboeuf Date: Tue, 4 Sep 2018 09:36:21 -0400 Subject: [PATCH 3/5] A comma --- routes/shopifyAuth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/shopifyAuth.js b/routes/shopifyAuth.js index 0280a69..bf86b5a 100644 --- a/routes/shopifyAuth.js +++ b/routes/shopifyAuth.js @@ -44,7 +44,7 @@ module.exports = function createShopifyAuthRoutes({ ` ); - }, + } // Users are redirected here after clicking `Install`. // The redirect from Shopify contains the authorization_code query parameter, From ff56fa487405b2ec6bcfbbec6562781a9a8dc5a2 Mon Sep 17 00:00:00 2001 From: Phillip Malboeuf Date: Tue, 4 Sep 2018 09:44:28 -0400 Subject: [PATCH 4/5] Revert A comma --- routes/shopifyAuth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/shopifyAuth.js b/routes/shopifyAuth.js index bf86b5a..0280a69 100644 --- a/routes/shopifyAuth.js +++ b/routes/shopifyAuth.js @@ -44,7 +44,7 @@ module.exports = function createShopifyAuthRoutes({ ` ); - } + }, // Users are redirected here after clicking `Install`. // The redirect from Shopify contains the authorization_code query parameter, From 290e984ab342d3f18d1f8fd6877c3c2bf39068a1 Mon Sep 17 00:00:00 2001 From: Phillip Malboeuf Date: Tue, 4 Sep 2018 09:54:58 -0400 Subject: [PATCH 5/5] callback async problem with parser --- routes/shopifyAuth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/shopifyAuth.js b/routes/shopifyAuth.js index 0280a69..38a1931 100644 --- a/routes/shopifyAuth.js +++ b/routes/shopifyAuth.js @@ -49,7 +49,7 @@ module.exports = function createShopifyAuthRoutes({ // Users are redirected here after clicking `Install`. // The redirect from Shopify contains the authorization_code query parameter, // which the app exchanges for an access token - async callback(request, response, next) { + callback: async (request, response, next)=> { const { query } = request; const { code, hmac, shop } = query;