mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 10:10:08 +02:00
[web] Fixup: Remove unused sendReconfirmation (#27486)
Wrong merge caused this error in https://github.com/overleaf/internal/pull/27423 (37c8fa1) GitOrigin-RevId: 3b0033f69fc872439c3f2ae37429fb05d9d69af1
This commit is contained in:
@@ -54,25 +54,6 @@ async function _sendSecurityAlertEmail(user, email) {
|
||||
await EmailHandler.promises.sendEmail('securityAlert', emailOptions)
|
||||
}
|
||||
|
||||
async function sendReconfirmation(req, res) {
|
||||
const userId = SessionManager.getLoggedInUserId(req.session)
|
||||
const email = EmailHelper.parseEmail(req.body.email)
|
||||
if (!email) {
|
||||
return res.sendStatus(400)
|
||||
}
|
||||
const user = await UserGetter.promises.getUserByAnyEmail(email, { _id: 1 })
|
||||
|
||||
if (!user || user._id.toString() !== userId) {
|
||||
return res.sendStatus(422)
|
||||
}
|
||||
await UserEmailsConfirmationHandler.promises.sendReconfirmationEmail(
|
||||
userId,
|
||||
email
|
||||
)
|
||||
|
||||
res.sendStatus(204)
|
||||
}
|
||||
|
||||
async function sendExistingEmailConfirmationCode(req, res) {
|
||||
const userId = SessionManager.getLoggedInUserId(req.session)
|
||||
const email = EmailHelper.parseEmail(req.body.email)
|
||||
|
||||
Reference in New Issue
Block a user