diff --git a/src/routes/cloudron.js b/src/routes/cloudron.js index 2391e481e..8ad3660bc 100644 --- a/src/routes/cloudron.js +++ b/src/routes/cloudron.js @@ -81,10 +81,10 @@ async function logout(req, res) { async function passwordResetRequest(req, res, next) { if (!req.body.identifier || typeof req.body.identifier !== 'string') return next(new HttpError(401, 'A identifier must be non-empty string')); - const [error, result] = await safe(users.sendPasswordResetByIdentifier(req.body.identifier, AuditSource.fromRequest(req))); + const [error] = await safe(users.sendPasswordResetByIdentifier(req.body.identifier, AuditSource.fromRequest(req))); if (error && error.reason !== BoxError.NOT_FOUND) return next(BoxError.toHttpError(error)); - next(new HttpSuccess(202, { resetLink: result })); + next(new HttpSuccess(202, {})); } async function passwordReset(req, res, next) { diff --git a/src/users.js b/src/users.js index 7b3ba473b..8def089eb 100644 --- a/src/users.js +++ b/src/users.js @@ -631,8 +631,6 @@ async function sendPasswordResetByIdentifier(identifier, auditSource) { const resetLink = `${settings.dashboardOrigin()}/login.html?resetToken=${user.resetToken}`; await mailer.passwordReset(user, user.fallbackEmail || user.email, resetLink); - - return resetLink; } async function getPasswordResetLink(user, auditSource) {