diff --git a/lib/exposure/exposure.js b/lib/exposure/exposure.js index b813b04..e18d3ce 100644 --- a/lib/exposure/exposure.js +++ b/lib/exposure/exposure.js @@ -152,10 +152,7 @@ export default class Exposure { }; Meteor.methods({ - [this.name]: methodBody, - [this.name + '_async']: async function(...args) { - return methodBody.call(this, ...args); - } + [this.name]: methodBody }); } diff --git a/lib/namedQuery/namedQuery.client.js b/lib/namedQuery/namedQuery.client.js index 348af23..466c24a 100644 --- a/lib/namedQuery/namedQuery.client.js +++ b/lib/namedQuery/namedQuery.client.js @@ -42,7 +42,7 @@ export default class extends Base { throw new Meteor.Error('This query is reactive, meaning you cannot use promises to fetch the data.'); } - return await callWithPromise(this.name + '_async', prepareForProcess(this.body, this.params)); + return await callWithPromise(this.name, prepareForProcess(this.body, this.params)); } /** diff --git a/lib/query/query.client.js b/lib/query/query.client.js index fed9996..769db47 100644 --- a/lib/query/query.client.js +++ b/lib/query/query.client.js @@ -42,7 +42,7 @@ export default class Query extends Base { throw new Meteor.Error('This query is reactive, meaning you cannot use promises to fetch the data.'); } - return await callWithPromise(this.name + '_async', prepareForProcess(this.body, this.params)); + return await callWithPromise(this.name, prepareForProcess(this.body, this.params)); } /**