Skip to content

Commit

Permalink
fix(authentication): avoid using return
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgnreis committed Jan 15, 2024
1 parent ef56451 commit ddbc96e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/routes/bling/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ exports.post = async ({ appSdk, admin }, req, res) => {
return appSdk.getAuth(storeId)
.then(async (auth) => {
try {
return getAppData({ appSdk, storeId, auth })
getAppData({ appSdk, storeId, auth })
.then(appData => {
const { client_id, client_secret } = appData
console.log('Pass variables', JSON.stringify({client_id, client_secret, code, storeId}))
const bling = new Bling(client_id, client_secret, code, storeId)
return bling.preparing
bling.preparing
.then((e) => {
console.log('deu certo a criação de autenticação')
res.status(200).redirect('https://app.e-com.plus/#/apps/edit/102418/')
Expand Down

0 comments on commit ddbc96e

Please sign in to comment.