Move every Actions.findOne(idOrFirstObjectSelector, options) to the ReactiveCache

This commit is contained in:
Martin Filser 2023-02-04 21:16:27 +01:00
parent c262620993
commit b48297df22
3 changed files with 53 additions and 5 deletions

View file

@ -20,9 +20,7 @@ BlazeComponent.extendComponent({
action() {
const ruleId = this.data().ruleId;
const rule = ReactiveCache.getRule(ruleId.get());
const action = Actions.findOne({
_id: rule.actionId,
});
const action = ReactiveCache.getAction(rule.actionId);
const desc = action.description();
const upperdesc = desc.charAt(0).toUpperCase() + desc.substr(1);
return upperdesc;