Skip to content

Commit

Permalink
fix(webhook): return (ends function) on async fb event request execution
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Jan 26, 2023
1 parent 1422d6b commit 6273ad7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/routes/ecom/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports.post = async ({ appSdk }, req, res) => {
const eventRequest = (new EventRequest(fbGraphToken, fbPixelId))
.setEvents(eventsData)

eventRequest.execute().then(
return eventRequest.execute().then(
response => {
// console.log('>> ', response)
logger.info(response)
Expand Down Expand Up @@ -232,7 +232,7 @@ exports.post = async ({ appSdk }, req, res) => {
const eventRequest = (new EventRequest(fbGraphToken, fbPixelId))
.setEvents(eventsData)

eventRequest.execute().then(
return eventRequest.execute().then(
response => {
// console.log('>> ', response)
logger.info(response)
Expand Down

0 comments on commit 6273ad7

Please sign in to comment.