The profile based password reset does not return a resetLink

This commit is contained in:
Johannes Zellner
2021-10-28 18:46:12 +02:00
parent 786b627bad
commit e36d7665fa
2 changed files with 2 additions and 4 deletions

View File

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