Skip to content

Commit

Permalink
Fix bug on pending email resending
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Jul 3, 2023
1 parent 728331e commit ab75528
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/api/user/email/resend-pending-confirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ export async function resendPendingEmailVerificationHandler ({
update users
set ${SQL.glue(updates, ' , ')}
where id = ${userId}
returning username, email, pending_email_update_token, pending_email_update_token_exp;
returning username, email, pending_email_update, pending_email_update_token, pending_email_update_token_exp;
`

const queryResults = await client.query(updateQuery)
const updatedUser = queryResults.rows.pop()

const emailSendJob = fastify.sendEmail({
toEmail: updatedUser.email,
toEmail: updatedUser.pending_email_update,
subject: verifyEmailSubject,
text: verifyEmailUpdateBody({
username: updatedUser.username,
Expand Down

0 comments on commit ab75528

Please sign in to comment.