Skip to content

Commit

Permalink
Fixed issue academind#30
Browse files Browse the repository at this point in the history
With respect to the issue raised academind#30. due to initialization of constructor objectId without new its throwing error. Add the changes now which working fine.
  • Loading branch information
Ram-143-sai authored Apr 9, 2023
1 parent 5546344 commit 3945a47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/routes/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ router.post("/", (req, res, next) => {
});
}
const order = new Order({
_id: mongoose.Types.ObjectId(),
_id: new mongoose.Types.ObjectId(),
quantity: req.body.quantity,
product: req.body.productId
});
Expand Down

0 comments on commit 3945a47

Please sign in to comment.