Return data on client (sync) and Promise on server (async) naturally, without wrapping in an extra Promise

This commit is contained in:
Harry Adel 2026-02-18 18:24:55 +02:00
parent 2b15a8ff09
commit f934aea2a5
21 changed files with 405 additions and 3760 deletions

View file

@ -54,20 +54,20 @@ Rules.helpers({
async rename(description) {
return await Rules.updateAsync(this._id, { $set: { description } });
},
async getAction() {
return await ReactiveCache.getAction(this.actionId);
getAction() {
return ReactiveCache.getAction(this.actionId);
},
async getTrigger() {
return await ReactiveCache.getTrigger(this.triggerId);
getTrigger() {
return ReactiveCache.getTrigger(this.triggerId);
},
async board() {
return await ReactiveCache.getBoard(this.boardId);
board() {
return ReactiveCache.getBoard(this.boardId);
},
async trigger() {
return await ReactiveCache.getTrigger(this.triggerId);
trigger() {
return ReactiveCache.getTrigger(this.triggerId);
},
async action() {
return await ReactiveCache.getAction(this.actionId);
action() {
return ReactiveCache.getAction(this.actionId);
},
});