From 1a68c8ab85d5655a5494877042c3019e5581d2d5 Mon Sep 17 00:00:00 2001 From: matheusgnreis Date: Tue, 16 Jan 2024 02:25:42 -0300 Subject: [PATCH] chore: remove autenticate after update token not necessary --- functions/lib/bling-auth/renovate-token.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/functions/lib/bling-auth/renovate-token.js b/functions/lib/bling-auth/renovate-token.js index 68c0d02..deb62db 100644 --- a/functions/lib/bling-auth/renovate-token.js +++ b/functions/lib/bling-auth/renovate-token.js @@ -30,7 +30,7 @@ module.exports = async () => { const handleAuth = (clientId, clientSecret, code = undefined, storeId, refreshToken) => { console.log('> Bling Auth02 ', storeId) - auth(clientId, clientSecret, code, storeId, refreshToken) + return auth(clientId, clientSecret, code, storeId, refreshToken) .then((data) => { console.log('> Bling token => ', JSON.stringify(data)) if (documentRef) { @@ -42,7 +42,6 @@ module.exports = async () => { updatedAt: Timestamp.now() }).catch(console.error) } - authenticate(data.access_token) }) .catch(reject) }