I'm confused about best practices to update certain documents in node, for example, I don't know if I should update multiple fields through req.body (which would make everything easier for me):
//course is the document and Course is the model
util.updateDocument(course, Course, req.body);
or if I should create several post methods each with one field of the document to update and request them in a row from the client:
app.put('/updatecourse/:field1',function(req, res){});
app.put('/updatecourse/:field2',function(req, res){});
app.put('/updatecourse/:field3',function(req, res){});
Currently I'm using the function that receives any field of the document through req.body and updates it, but from what I heard that is not a good practice, plus the methods are not asynchronous. Can someone explain to me what are the best practices for this situation?