fixed user controller
This commit is contained in:
parent
e881f3a6ba
commit
8e1f4a2b08
1 changed files with 2 additions and 1 deletions
|
|
@ -44,7 +44,8 @@ exports.post = [
|
||||||
password: await bcrypt.hash(password, 10),
|
password: await bcrypt.hash(password, 10),
|
||||||
});
|
});
|
||||||
|
|
||||||
await User.findByIdAndUpdate(dbUser._id, user, {});
|
// save to DB
|
||||||
|
await user.save();
|
||||||
|
|
||||||
return res.status(200).json({
|
return res.status(200).json({
|
||||||
message: "User created!",
|
message: "User created!",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue