todo.updateOne()
thinley4 opened this issue · comments
Thinley commented
In backend/index.js
Code:
await todo.updateOne
instead of
await todo.update
Ankitbagga75 commented
we can use update because _id is unique for every document so this will update only that document
Ajay Mandal commented
await todo.updateOne()
works for me
While using await todo.update()
, it throws error that await todo.update() is not a function
.
Thinley commented
await todo.updateOne()
works for meWhile using
await todo.update()
, it throws error thatawait todo.update() is not a function
.
Correct ✅
Amardeep Phule commented
Thank you @thinley4 , the solution works for me.