Change in parameter and code cleanup.

This commit is contained in:
James Cole
2023-10-14 07:13:35 +02:00
parent c1107fe854
commit 58848caf30
19 changed files with 47 additions and 46 deletions

View File

@@ -46,8 +46,6 @@ class AutocompleteRequest extends FormRequest
if ('' !== $types) {
$array = explode(',', $types);
}
$limit = $this->convertInteger('limit');
$limit = 0 === $limit ? 10 : $limit;
// remove 'initial balance' from allowed types. its internal
$array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
@@ -56,7 +54,6 @@ class AutocompleteRequest extends FormRequest
'types' => $array,
'query' => $this->convertString('query'),
'date' => $this->getCarbonDate('date'),
'limit' => $limit,
];
}
@@ -66,7 +63,6 @@ class AutocompleteRequest extends FormRequest
public function rules(): array
{
return [
'limit' => 'min:0|max:1337',
];
}
}