Skip to content

storing data in mongose according to example #8

@devdavidkarlsson

Description

@devdavidkarlsson

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions