Various code cleanup.

This commit is contained in:
James Cole
2021-05-24 08:54:58 +02:00
parent 815fd5ff6b
commit d60650cff2
63 changed files with 134 additions and 88 deletions

View File

@@ -66,6 +66,8 @@ class IndexController extends Controller
/**
* @return LaravelResponse
* @throws CannotInsertRecord
* @throws \FireflyIII\Exceptions\FireflyException
* @throws \League\Csv\Exception
*/
public function export(): LaravelResponse
{
@@ -89,7 +91,7 @@ class IndexController extends Controller
$quoted = sprintf('"%s"', addcslashes($name, '"\\'));
// headers for CSV file.
/** @var LaravelResponse $response */
$response = response($result['transactions'], 200);
$response = response($result['transactions']);
$response
->header('Content-Description', 'File Transfer')
->header('Content-Type', 'text/x-csv')