Meteor.callAsync vs Meteor.apply?

How does it work please explain and how to use?

I think the right questions are

  • vs Meteor.apply
  • Meteor.callAsync vs Meteor.applyAsync

These docs may help:

@minhna I have Method on server below

export const reportSummary = new ValidatedMethod({
  name: 'pos.reportSummary',
  mixins: [CallPromiseMixin],
  applyOptions: {
    noRetry: true, 
  async run(selector) {
   // some code here

and then I call Method on client

Meteor.applyAsync('pos.reportSummary', this.form, (err, result)=>{

But it does not working.

I don’t know what it does not working mean. Be careful when you use Meteor.apply and Meteor.applyAsync function, the param you use will be different to and Meteor.callAsync

@minhna Now it work fine Meteor.apply(β€œ β€œ, [ ])

1 Like