I am trying to call a very basic function with a callback from Meteor.methods. The function I'm calling is "fakeInit" and is defined as follow:
var session.prototype.fakeInit = function(user,labId,callback){
callback(null,"here");
}
My call is in Meteor.methods, the method call gets handled properly and results in the expected behavior except when I call fakeInit with wrapAsync. I get an error that is "typeError: callback is not a function" I have been following the tutorials and this seems like how it should work, I submit the proper arguments and have tried it with a json object as well. The call is below:
var sessionAsync = Meteor.wrapAsync(session.fakeInit,session);
try{
var result = sessionAsync(uId,labId);
retu "success";
}
catch(e){
TuxLog.log("wa",e);
retu "error: "+e;
}
