I'm following a guide over at The Meteor Chef to wrap an asynchronous function and call it synchronously. However, when the code executes it appears to just jump over the method call entirely. Not sure what I'm doing incorrectly.
if (!err) {
Meteor.methods({
'ldapLogin': function(username, password) {
var syncFunc = Meteor.wrapAsync(processLdapLogin);
var result = syncFunc(username, password, Meteor.user());
console.log(result);
}
});
Meteor.call('ldapLogin', username, password);
}