Skip to content

Commit

Permalink
check for subscriber.fxa_uid before ping
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed Nov 22, 2019
1 parent 0bfc5e7 commit 5920aef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ async function recordVisitFromEmail (req, res, next) {
next();
}
const subscriber = await DB.getSubscriberById(req.query.subscriber_id);
if (!subscriber.fxa_uid) {
next();
}
const fxaMetricsFlowPath = `metrics-flow?event_type=engage&uid=${subscriber.fxa_uid}&service=${AppConstants.OAUTH_CLIENT_ID}`;
await FXA.sendMetricsFlowPing(fxaMetricsFlowPath);
next();
Expand Down

0 comments on commit 5920aef

Please sign in to comment.