Skip to content

why user is undefined? #4

Description

@mmdsharifi

Hi,
I wrote same codes as you commit in this repository but when putting a new user via postman, I face this error :

E:\learnJS\SocialNetwork\example-node-server\models\user.js:39
  if (!user.isModified('password')) return callback();
           ^

TypeError: Cannot read property 'isModified' of undefined

my codes: https://github.com/mmdsharifi/skillsharee
and erro : https://github.com/mmdsharifi/skillsharee/blob/28814dce8b47e8dfe7910336360d6586019a03ac/models/user.js#L22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions