Nisha Patel
Problem
I am following a tutorial and am stuck on the last part of it. I am trying to overwrite the contents of the database via a 'PUT' request.
The contents of the database are in this format:
I am trying this in Postman and there is no error. But the problem is that the contents of the database aren't updated. Since there is no error that is shown, it is hard to figure out what the problem is.
Solution
You should use the updateOne API to update a document.
refs
>https://mongoosejs.com/docs/api/model.html#Model.updateOne()
Answered by: >xgqfrms
Credit: >StackOverflow
Blog Links:
>Sorting the restframework in Django
>Ways to access instances of models in view in order to save both forms at once in Django
>What makes index.html have such kind of name in Django?
>Fix Module Not Found during Deployment- Django
>Creating a Django with existing directories, files, etc.?
>How to Read a CSV file with PHP using cURL?