mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-02 03:31:02 +00:00
Compare commits
7 Commits
develop-20
...
develop-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dd2627a6a | ||
|
|
22074568ae | ||
|
|
df03899588 | ||
|
|
7f4f95097b | ||
|
|
c96ada053f | ||
|
|
523ec7c0a1 | ||
|
|
61444e9660 |
@@ -79,8 +79,8 @@ class UpdateRequest extends FormRequest
|
||||
'start_date' => 'date|nullable',
|
||||
'target_date' => 'date|nullable|after:start_date',
|
||||
'notes' => 'max:65000',
|
||||
'accounts' => 'required',
|
||||
'accounts.*' => 'array|required',
|
||||
'accounts' => 'array',
|
||||
'accounts.*' => 'array',
|
||||
'accounts.*.account_id' => ['required', 'numeric', 'belongsToUser:accounts,id'],
|
||||
'accounts.*.current_amount' => ['numeric', 'nullable', new IsValidZeroOrMoreAmount(true)],
|
||||
'object_group_id' => 'numeric|belongsToUser:object_groups,id',
|
||||
|
||||
@@ -37,17 +37,19 @@ class UpdateRequest extends FormRequest
|
||||
use ChecksLogin;
|
||||
use ConvertsDataTypes;
|
||||
|
||||
private array $booleans = ['configuration.is_demo_site', 'configuration.single_user_mode', 'configuration.enable_exchange_rates', 'configuration.use_running_balance', 'configuration.enable_external_map', 'configuration.enable_external_rates', 'configuration.allow_webhooks'];
|
||||
private array $integers = ['configuration.permission_update_check', 'configuration.last_update_check'];
|
||||
|
||||
/**
|
||||
* Get all data from the request.
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
$name = $this->route()->parameter('dynamicConfigKey');
|
||||
|
||||
if ('configuration.is_demo_site' === $name || 'configuration.single_user_mode' === $name) {
|
||||
if (in_array($name, $this->booleans, true)) {
|
||||
return ['value' => $this->boolean('value')];
|
||||
}
|
||||
if ('configuration.permission_update_check' === $name || 'configuration.last_update_check' === $name) {
|
||||
if (in_array($name, $this->integers, true)) {
|
||||
return ['value' => $this->convertInteger('value')];
|
||||
}
|
||||
|
||||
@@ -61,13 +63,13 @@ class UpdateRequest extends FormRequest
|
||||
{
|
||||
$name = $this->route()->parameter('configName');
|
||||
|
||||
if ('configuration.is_demo_site' === $name || 'configuration.single_user_mode' === $name) {
|
||||
if (in_array($name, $this->booleans, true)) {
|
||||
return ['value' => ['required', new IsBoolean()]];
|
||||
}
|
||||
if ('configuration.permission_update_check' === $name) {
|
||||
return ['value' => 'required|numeric|min:-1|max:1'];
|
||||
}
|
||||
if ('configuration.last_update_check' === $name) {
|
||||
if (in_array($name, $this->integers, true)) {
|
||||
return ['value' => 'required|numeric|min:464272080'];
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,16 @@ class DynamicConfigKey
|
||||
{
|
||||
public static array $accepted
|
||||
= [
|
||||
'configuration.is_demo_site',
|
||||
'configuration.permission_update_check',
|
||||
'configuration.single_user_mode',
|
||||
'configuration.last_update_check',
|
||||
'configuration.is_demo_site', // boolean
|
||||
'configuration.permission_update_check', // -1, 0 or 1 (never asked, no permission, permission)
|
||||
'configuration.single_user_mode', // boolean
|
||||
'configuration.last_update_check', // timestamp
|
||||
'configuration.enable_exchange_rates', // boolean
|
||||
'configuration.use_running_balance', // boolean
|
||||
'configuration.enable_external_map', // boolean
|
||||
'configuration.enable_external_rates', // boolean
|
||||
'configuration.allow_webhooks', // boolean
|
||||
'configuration.valid_url_protocols', // string ("http,https")
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ return [
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2025-12-30',
|
||||
'build_time' => 1767107843,
|
||||
'build_time' => 1767125279,
|
||||
'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