Fixed bug in error handler, finished implementing update user endpoint

This commit is contained in:
Alex Holliday committed 2024-05-27 12:03:32 -07:00
1 parent 734efb1e29
commit 78abdd7f70
3 files changed
+2 -3

No files matched your search

+1 -1
View File
@@ -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