Fixup status code typo

This commit is contained in:
Johannes Zellner
2020-03-06 11:59:31 -08:00
parent 85fd74135c
commit a7b00bad63

View File

@@ -107,7 +107,7 @@ function passwordReset(req, res, next) {
// setPassword clears the resetToken
users.setPassword(userObject, req.body.password, function (error) {
if (error && error.reason === BoxError.BAD_FIELD) return next(new HttpError(406, error.message));
if (error && error.reason === BoxError.BAD_FIELD) return next(new HttpError(400, error.message));
if (error) return next(new HttpError(500, error));
tokens.add(tokens.ID_WEBADMIN, userObject.id, Date.now() + constants.DEFAULT_TOKEN_EXPIRATION, {}, function (error, result) {