Skip to content

Commit

Permalink
Update UserActionController.js
Browse files Browse the repository at this point in the history
  • Loading branch information
johndatserakis authored Oct 5, 2017
1 parent 307a0b3 commit 7f315d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controllers/UserActionController.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ class UserController {
resetUrl: resetUrlCustom,
},
}
await sgMail.send(emailData)

// Let's only send the email if we're not testing
if (process.env.NODE_ENV !== 'testing') {
await sgMail.send(emailData)
}
}

ctx.body = { passwordResetToken: resetData.passwordResetToken }
Expand Down

0 comments on commit 7f315d2

Please sign in to comment.