Fixed bug in error handler, finished implementing update user endpoint
This commit is contained in:
1 parent
734efb1e29
commit
78abdd7f70
3 files changed
+2
-3
No files matched your search
@@ -69,7 +69,7 @@ const updateUser = async (req, res) => {
|
||||
const candidateUser = req.body;
|
||||
|
||||
try {
|
||||
const updatedUser = await user.findByIdAndUpdate(
|
||||
const updatedUser = await UserModel.findByIdAndUpdate(
|
||||
candidateUserId,
|
||||
candidateUser,
|
||||
{ new: true } // Returns updated user instead of pre-update user
|
||||
|
||||
Reference in new issue
Block a user