Mongodb – findByIdAndUpdate adding another document to the database rather than updating
I am using MEAN stack for patient CRUD operations. The update does not seem to be working properly. It adds another document to the database with the updated info but with a null id and leaves the old document that…