mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
commit
0dc8bb1fb2
@ -270,6 +270,7 @@ class PreviewController extends BaseController
|
||||
DB::connection(config('database.default'))->rollBack();
|
||||
|
||||
if (request()->query('html') == 'true') {
|
||||
DB::purge(config('database.default'));
|
||||
return $maker->getCompiledHTML;
|
||||
}
|
||||
|
||||
@ -278,6 +279,8 @@ class PreviewController extends BaseController
|
||||
catch(\Exception $e){
|
||||
|
||||
DB::connection(config('database.default'))->rollBack();
|
||||
DB::purge(config('database.default'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -301,6 +304,7 @@ class PreviewController extends BaseController
|
||||
->batch();
|
||||
}
|
||||
|
||||
DB::purge(config('database.default'));
|
||||
|
||||
$response = Response::make($file_path, 200);
|
||||
$response->header('Content-Type', 'application/pdf');
|
||||
|
Loading…
Reference in New Issue
Block a user