Closed tr222cj closed 7 years ago
ERROR: Cannot read property 'username' of undefined
Mongoose save does not return saved object. code should probably be:
new this(user).save((saveErr) => { const returnedUser = { username: user.username }; callback(saveErr, returnedUser); });
This seems to be resolved since it works now.
Im assuming the problem is resolved
ERROR: Cannot read property 'username' of undefined
Mongoose save does not return saved object. code should probably be:
new this(user).save((saveErr) => { const returnedUser = { username: user.username }; callback(saveErr, returnedUser); });