Skip to content

Commit

Permalink
fix(users): find by email on requesting removal
Browse files Browse the repository at this point in the history
  • Loading branch information
sg-gs committed Nov 24, 2023
1 parent 66c7263 commit 7fea15c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server/routes/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ UsersRouter.prototype.destroyUser = function (req, res, next) {
return next(new errors.BadRequestError('Missing required params'));
}

User.findOne({ _id: req.params.id }, function (err, user) {
User.findOne({ email: req.params.id }, function (err, user) {
if (err) {
return next(new errors.InternalError(err.message));
}
Expand Down

0 comments on commit 7fea15c

Please sign in to comment.