mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Fix missing parameters
This commit is contained in:
@@ -73,27 +73,28 @@ class AutocompleteRequest extends FormRequest
|
||||
];
|
||||
}
|
||||
|
||||
public function getData(): array
|
||||
{
|
||||
return [];
|
||||
$types = $this->convertString('types');
|
||||
$array = [];
|
||||
if ('' !== $types) {
|
||||
$array = explode(',', $types);
|
||||
}
|
||||
$limit = $this->convertInteger('limit');
|
||||
$limit = 0 === $limit ? 10 : $limit;
|
||||
|
||||
// remove 'initial balance' and another from allowed types. its internal
|
||||
$array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
|
||||
|
||||
return [
|
||||
'types' => $array,
|
||||
'query' => $this->convertString('query'),
|
||||
'date' => $this->getCarbonDate('date'),
|
||||
'limit' => $limit,
|
||||
];
|
||||
}
|
||||
// public function getData(): array
|
||||
// {
|
||||
//
|
||||
// return [];
|
||||
// $types = $this->convertString('types');
|
||||
// $array = [];
|
||||
// if ('' !== $types) {
|
||||
// $array = explode(',', $types);
|
||||
// }
|
||||
// $limit = $this->convertInteger('limit');
|
||||
// $limit = 0 === $limit ? 10 : $limit;
|
||||
//
|
||||
// // remove 'initial balance' and another from allowed types. its internal
|
||||
// $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
|
||||
//
|
||||
// return [
|
||||
// 'types' => $array,
|
||||
// 'query' => $this->convertString('query'),
|
||||
// 'date' => $this->getCarbonDate('date'),
|
||||
// 'limit' => $limit,
|
||||
// ];
|
||||
// }
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
|
Reference in New Issue
Block a user