mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Compare commits
7 Commits
develop-20
...
develop-20
Author | SHA1 | Date | |
---|---|---|---|
|
7e344e4332 | ||
|
0a55e9fb4e | ||
|
ed2e0e86dc | ||
|
9d1fb2cd6a | ||
|
57617b750f | ||
|
f6411fdc5a | ||
|
02e24fc919 |
@@ -128,23 +128,25 @@ class ShowController extends Controller
|
||||
// get list of accounts. Count it and split it.
|
||||
$this->repository->resetAccountOrder();
|
||||
$account->refresh();
|
||||
$manager = $this->getManager();
|
||||
[$start, $end, $date] = $request->attributes->all();
|
||||
$manager = $this->getManager();
|
||||
['start' => $start,
|
||||
'end' => $end,
|
||||
'date' => $date,] = $request->attributes->all();
|
||||
|
||||
// enrich
|
||||
/** @var User $admin */
|
||||
$admin = auth()->user();
|
||||
$enrichment = new AccountEnrichment();
|
||||
$admin = auth()->user();
|
||||
$enrichment = new AccountEnrichment();
|
||||
$enrichment->setDate($date);
|
||||
$enrichment->setStart($start);
|
||||
$enrichment->setEnd($end);
|
||||
$enrichment->setUser($admin);
|
||||
$account = $enrichment->enrichSingle($account);
|
||||
$account = $enrichment->enrichSingle($account);
|
||||
|
||||
|
||||
/** @var AccountTransformer $transformer */
|
||||
$transformer = app(AccountTransformer::class);
|
||||
$resource = new Item($account, $transformer, self::RESOURCE_KEY);
|
||||
$transformer = app(AccountTransformer::class);
|
||||
$resource = new Item($account, $transformer, self::RESOURCE_KEY);
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ class PaginationRequest extends ApiRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'sort' => ['nullable', new IsValidSortInstruction($this->sortClass)],
|
||||
'sort' => ['nullable', new IsValidSortInstruction((string)$this->sortClass)],
|
||||
'limit' => 'numeric|min:1|max:131337',
|
||||
'page' => 'numeric|min:1|max:131337',
|
||||
];
|
||||
|
@@ -38,6 +38,11 @@ class IsValidSortInstruction implements ValidationRule
|
||||
|
||||
return;
|
||||
}
|
||||
if ('' === $value) {
|
||||
// don't validate.
|
||||
|
||||
return;
|
||||
}
|
||||
$validParameters = config(sprintf('firefly.allowed_sort_parameters.%s', $shortClass));
|
||||
if (!is_array($validParameters)) {
|
||||
$fail('validation.no_sort_instructions')->translate(['object' => $shortClass]);
|
||||
|
@@ -79,7 +79,7 @@ return [
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2025-10-10',
|
||||
'build_time' => 1760115185,
|
||||
'build_time' => 1760124066,
|
||||
'api_version' => '2.1.0', // field is no longer used.
|
||||
'db_version' => 28, // field is no longer used.
|
||||
|
||||
|
Reference in New Issue
Block a user