I haven’t written Meteor methods in a while, and I remember having to use Fibers if I wanted to call an async function from a method and return the value from the async function. Is that still the case, or can I do something like the following?
Meteor.methods({
'items.search'(term) {
return new Promise((resolve, reject) => {
asyncFunctionWithCallback(term, (data) => {
resolve(data);
});
});
}
});