Skip to content

Commit a285491

Browse files
committed
update option for findByIdAndRemove method in comtroller
1 parent 7f48b19 commit a285491

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/tutorial.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ exports.update = (req, res) => {
9393
exports.delete = (req, res) => {
9494
const id = req.params.id;
9595

96-
Tutorial.findByIdAndRemove(id)
96+
Tutorial.findByIdAndRemove(id, { useFindAndModify: false })
9797
.then(data => {
9898
if (!data) {
9999
res.status(404).send({

0 commit comments

Comments
 (0)