This commit is contained in:
James Cole
2025-11-01 18:44:32 +01:00
parent a941dca5e1
commit 8ff40e22e0
6 changed files with 11 additions and 13 deletions

View File

@@ -81,6 +81,7 @@ class AccountController extends Controller
*/
public function accounts(AutocompleteApiRequest $request): JsonResponse
{
Log::debug('Before All.');
[
'types' => $types,
'query' => $query,
@@ -89,7 +90,6 @@ class AccountController extends Controller
]
= $request->attributes->all();
$date ??= today(config('app.timezone'));
// set date to end-of-day for account balance. so it is at $date 23:59:59

View File

@@ -40,10 +40,6 @@ class DateRangeRequest extends ApiRequest
$validator->after(
function (Validator $validator): void {
if ($validator->failed()) {
// set null values
$this->attributes->set('start', null);
$this->attributes->set('end', null);
return;
}
$start = $this->getCarbonDate('start')?->startOfDay();

View File

@@ -47,11 +47,14 @@ class AccountTypesApiRequest extends ApiRequest
if ($validator->failed()) {
return;
}
$type = $this->convertString('types', 'all');
$this->attributes->add([
'types' => $this->mapAccountTypes($type),
]);
$types = explode(',', $this->convertString('types', 'all'));
$result = [];
// split and find all types:
foreach ($types as $type) {
$result = array_merge($result, $this->mapAccountTypes($type));
}
$result = array_unique($result);
$this->attributes->set('types', $result);
}
);
}

View File

@@ -68,12 +68,10 @@ class PaginationRequest extends ApiRequest
$user = auth()->user();
$limit = (int)Preferences::getForUser($user, 'listPageSize', 50)->data;
}
$page = $this->convertInteger('page');
$page = min(max(1, $page), 2 ** 16);
$offset = ($page - 1) * $limit;
$sort = $this->sortClass ? $this->convertSortParameters('sort', $this->sortClass) : $this->get('sort');
$this->attributes->set('limit', $limit);
$this->attributes->set('sort', $sort);
$this->attributes->set('page', $page);

View File

@@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- #11144
- #11147
## 6.4.3 - 2025-11-01