Closed maneyputha closed 5 years ago
Callback gives an error
node_modules/mysql/lib/protocol/Parser.js:80 throw err; // Rethrow non-MySQL errors ^ TypeError: done is not a function
When the callback is used as following
createUserProcess:function(id, fName, lName, hashPassword, birthday, gender, privilege, contactNumber, country, dpUrl, callback){ var newUser = { Email : id, FirstName : fName, LastName : lName, Password : hashPassword, Birthday : birthday, Gender : gender, Privilege : privilege, ContactNumber : contactNumber, Country : country, DpUrl : dpUrl }; models.user.create(newUser, callback); },
however it works when used as following
models.user.create(newUser, function(err, results) { if(err) { console.log(err); } });
does anybody knows how to make it work as in the first method ? Thanks
Callback gives an error
When the callback is used as following
however it works when used as following
does anybody knows how to make it work as in the first method ? Thanks