Merge pull request #15822 from overleaf/mj-audit-log-tokens

[web] Add audit logs for token expiration operations

GitOrigin-RevId: 220fe017cf508ead986a4cd2bd9009035418ce43
This commit is contained in:
Mathias Jakobsen
2023-11-21 09:03:59 +00:00
committed by Copybot
parent 1ff830027f
commit 9ca43ebc4e
5 changed files with 68 additions and 19 deletions
@@ -125,7 +125,12 @@ const UserEmailsConfirmationHandler = {
if (!emailExists) {
return callback(new Errors.NotFoundError('email missing for user'))
}
UserUpdater.confirmEmail(userId, email, callback)
UserUpdater.confirmEmail(userId, email, function (error) {
if (error) {
return callback(error)
}
callback(null, { userId, email })
})
})
}
)