خرید بک لینک

Vote count: 0

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;
     }

asked 12 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 28 تير 1395 ساعت: 22:54

صفحه بندی