You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Storing data using the provided example for human does not store any firstname, lastname in database.
It appears that "req.body" is undefined in HumansCtrl:
var HumansCtrl = {
create : function(req, res) {
console.log(req.body); <---- This is undefined! So nothing is stored in the db.
var human = new Human(req.body)
human.save(function (err, human) {
res.send(human);
});
},
Bug from require?
The text was updated successfully, but these errors were encountered:
Storing data using the provided example for human does not store any firstname, lastname in database.
It appears that "req.body" is undefined in HumansCtrl:
var HumansCtrl = {
create : function(req, res) {
console.log(req.body); <---- This is undefined! So nothing is stored in the db.
var human = new Human(req.body)
human.save(function (err, human) {
res.send(human);
});
},
Bug from require?
The text was updated successfully, but these errors were encountered: