mirror of
https://github.com/vale981/grapher
synced 2025-03-05 17:41:41 -05:00
updated promises functionality
This commit is contained in:
parent
401bd0e9ba
commit
a32920d957
3 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue