Kaynağa Gözat

[web] Fixup: Remove unused `sendReconfirmation` (#27486)

Wrong merge caused this error in https://github.com/overleaf/internal/pull/27423 (37c8fa1)

GitOrigin-RevId: 3b0033f69fc872439c3f2ae37429fb05d9d69af1
Antoine Clausse 1 yıl önce
ebeveyn
işleme
7f8a423104

+ 0 - 19
services/web/app/src/Features/User/UserEmailsController.js

@@ -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)