pirple/The-NodeJS-Master-Class

handler._users[data.method] is not a function

Opened this issue · 1 comments

handler._usersdata.method;
image

Hello there,
I was had the same error, I look al the file and find this and de botton
// users - get
handlers._users.post = function(data,callback){

};

// users - put
handlers._users.post = function(data,callback){

};

// users - delete
handlers._users.post = function(data,callback){

};

// Export the handlers
module.exports = handlers;

I had 4 POST method. just change each one for the respective method and it works for me