Since the target for onConflictDoUpdate on createPasswordResetToken was set to resetToken.id instead of resetToken.userId, if I clicked twice on "Send Reset Email" it would throw an "Duplicate key value violates unique constraints" error instead of refreshing the token in the db.
Since the target for
onConflictDoUpdate
oncreatePasswordResetToken
was set toresetToken.id
instead ofresetToken.userId
, if I clicked twice on "Send Reset Email" it would throw an "Duplicate key value violates unique constraints" error instead of refreshing the token in the db.