, "". : Exception while invoking method Error: Accounts.createUser with callback not supported on the server yet.
, , , . .
. , . , - , , , . .
Meteor.methods({
postForm:function(doc){
try {
var result = Accounts.createUser({
username: doc.username,
password: doc.password,
email: doc.emails,
profile: {
lastname: doc.lastname,
contact:doc.phoneNumber,
bdat:doc.bod,
address:doc.address
}
});
if(result){
return result;
}
}
catch(err){
return err;
}
}
});
, "" callback not supported. , . Accounts.validateNewUser((user), , .
, ... .
Meteor.call('postForm', newUser, function(error, response) {
if (error) {
console.log('postForm: Error: ', error);
}
if (response) {
console.log('postForm: Response: ', response);
}
});
. , , , - ""!