Code and routes for rules.

This commit is contained in:
James Cole
2018-12-07 16:03:05 +01:00
parent 9a2e5c36a1
commit 8e4092e7d7
7 changed files with 206 additions and 41 deletions

View File

@@ -257,7 +257,7 @@ class FireflyValidator extends Validator
$index = (int)($parts[1] ?? '0');
// get the name of the trigger from the data array:
$actionType = $this->data['rule_actions'][$index]['name'] ?? 'invalid';
$actionType = $this->data['actions'][$index]['name'] ?? 'invalid';
// if it's "invalid" return false.
if ('invalid' === $actionType) {
@@ -320,7 +320,7 @@ class FireflyValidator extends Validator
$index = (int)($parts[1] ?? '0');
// get the name of the trigger from the data array:
$triggerType = $this->data['rule_triggers'][$index]['name'] ?? 'invalid';
$triggerType = $this->data['triggers'][$index]['name'] ?? 'invalid';
// invalid always returns false:
if ('invalid' === $triggerType) {