Skip to content

Commit

Permalink
update time on email tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Oct 2, 2023
1 parent d664b51 commit 7d1e3b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/pds/src/services/account/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,11 @@ export class AccountService {
await this.db.db
.insertInto('email_token')
.values({ purpose, did, token, requestedAt: new Date() })
.onConflict((oc) => oc.columns(['purpose', 'did']).doUpdateSet({ token }))
.onConflict((oc) =>
oc
.columns(['purpose', 'did'])
.doUpdateSet({ token, requestedAt: new Date() }),
)
.execute()
return token
}
Expand Down

0 comments on commit 7d1e3b2

Please sign in to comment.