Skip to content

Commit 1c8b498

Browse files
committed
fix(bling-auth): update variable response
1 parent 9d64ae1 commit 1c8b498

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

functions/lib/bling-auth/create-access.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = async function (clientId, clientSecret, storeId, tokenExpiratio
2626
accessToken = docAccessToken
2727
} else {
2828
try {
29-
const { data } = await blingAuth(clientId, clientSecret, null, storeId, refreshToken)
29+
const data = await blingAuth(clientId, clientSecret, null, storeId, refreshToken)
3030
docRef.set({
3131
...data,
3232
updatedAt: now,

functions/routes/bling/authentication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports.get = async ({ appSdk, admin }, req, res) => {
1717
.then(async (appData) => {
1818
const { client_id: clientId, client_secret: clientSecret } = appData
1919
console.log('Pass variables', JSON.stringify({ clientId, clientSecret, code, storeId }))
20-
const { data } = await blingAuth(clientId, clientSecret, code, storeId)
20+
const data = await blingAuth(clientId, clientSecret, code, storeId)
2121
const now = Timestamp.now()
2222
await getFirestore().doc(`${firestoreColl}/${storeId}`).set({
2323
...data,

0 commit comments

Comments
 (0)