hello!
i’m still very new to Meteor and i hope you can help. on the server side, i ave a function that looks something like this:
loadMoreStuff = function(url) {
HTTP.call('POST', url,
{params: settings.user},
function(error, result) {
if (error) {
console.log(error)
} else {
var result = result.data.auth,
agencies = result.userAgencies,
return agencies;
}
})
}
and also on the server side, i have a function that wraps the loadMoreStuff with Meteor.wrapAsync:
Meteor.methods({
loadStuff: function() {
var url = 'blahblahblah.com'
var testFunc = Meteor.wrapAsync(loadStuff);
var result = testFunc(url);
return result;
}
})
and on the client side, I call
Meteor.call('loadStuff', function(error, result) {
//stuff
})
i can see that the HTTP post is returning the correct result, but for some reason in my loadStuff function on the server side, it is not returning the result from Meteor.wrapAsync.
thanks so much!