mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Change requirements for report request
This commit is contained in:
parent
f5e24de767
commit
d123fea439
@ -31,7 +31,7 @@ class GenericReportRequest extends Request
|
||||
'start_date' => 'string|date',
|
||||
'end_date' => 'string|date',
|
||||
'date_key' => 'string',
|
||||
'date_range' => 'required|string',
|
||||
'date_range' => 'sometimes|string',
|
||||
'report_keys' => 'present|array',
|
||||
'send_email' => 'required|bool',
|
||||
];
|
||||
@ -41,6 +41,8 @@ class GenericReportRequest extends Request
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
if(!array_key_exists('date_range', $input))
|
||||
$input['date_range'] = 'all';
|
||||
|
||||
if(!array_key_exists('report_keys', $input))
|
||||
$input['report_keys'] = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user